Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Git Workshop 03
Search
Li-Hsuan Chen
October 06, 2016
Programming
0
110
Git Workshop 03
以 git remote 為主軸,搭配 GitHub 實作
Li-Hsuan Chen
October 06, 2016
Tweet
Share
More Decks by Li-Hsuan Chen
See All by Li-Hsuan Chen
The UX thinking of PAY ID
vc7
2
410
From Onboarding to Value Delivering in iOS
vc7
0
230
Merciless Refactoring
vc7
0
690
Protocol 的實例、測試和心得
vc7
2
750
共有経済
vc7
0
160
.gitignore
vc7
1
75
Git Workshop 02
vc7
0
93
Escaping Closures in Swift - 公司內分享會
vc7
1
210
Git Workshop 01
vc7
0
150
Other Decks in Programming
See All in Programming
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
150
Outline View in SwiftUI
1024jp
1
320
Jakarta EE meets AI
ivargrimstad
0
590
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
Amazon Qを使ってIaCを触ろう!
maruto
0
400
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
subpath importsで始めるモック生活
10tera
0
300
Arm移行タイムアタック
qnighy
0
310
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
How GitHub (no longer) Works
holman
310
140k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Fireside Chat
paigeccino
34
3k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Ruby is Unlike a Banana
tanoku
97
11k
Music & Morning Musume
bryan
46
6.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Transcript
(JU8PSLTIPQ 痧♲㔐 ꤫愴蠩
㥶卓⡹殹♴聃♶䥢 〳⟃꼛♳䩧倬䧮
㣐笧 ˖ 㔐瘸♧妄㉏⽷涸㉏겗 ˖ (JU齡❉䢫欽涸匌銯 ˖ 3FNPUF㻜⡲ ˖ 倞㟞SFNPUF ˖
ㄤSFNPUFSFQPTJUPSZ✽⹛ ˖ 3FNPUF✽⹛涸麕玑
㔐瘸㉏겗
.FSHF5PPMT
.FSHF5PPMT ˖ 㣖㢵DPOJDU ˖ 〳腋僽ꨆ⚺箁㣖⛉ ˖ 䫵姊䧮鿪僽➃䊨鍑DPOJDU ˖ 〳⟃㢵㎲鑑♶ず涸NFSHFUPPMT
鼚⯝䘰鱲涸⾲㔔
鼚⯝䘰鱲涸⾲㔔 ˖ ⥃殆CSBODI涸暶䗚 ˖ 㺂僒鳺陏㥪鷆髠 ˖ 鼚⯝㔔捀䘰鱲㖈⚺銴ⴕ佅♳隶刿 ˖ 㕰㼩倴CSBODI涸佟瘼
䗂⾲乽⡲
(JU涸♲⦐ꥣ媯 8PSLJOH%JSFDUPSZ 䊨⡲湡ꏗ 4UBHF *OEFY 程䒸⼦ -PDBM3FQPTJUPSZ 劥㖒⮭㶸䏨 git
commit git add <files> git reset -- <files > git checkout -- <files>
3FTFU$IFDLPVU git reset git checkout 獵⹛)&"%撑涸⡙縨 獵⹛CSBODI撑涸⡙縨
佹㔐CSBODI ˖ 欽HJUSFPH䪪ⵌ鑪CSBODI剓䖕鄄DPNNJU涸⡙縨ⱄ䪾CSBODI⸈㔐齡 ⦐⡙縨♳ • $ git reflog • $
git branch branchName [commit id] ˖ 殹㖈ⵅꤑCSBODI涸儘⦬剚㔐꺈DPNNJUJEㄤCSBODIOBNF窍⡹呏 亙鸏❉鎝䜂〳⟃䪾CSBODI⸈㔐⢵ • $ git branch -D master • Deleted branch master (was 130d7ba). • $ git branch master 130d7ba
䩧ꐫ䙦랃鳵
䩧ꐫ䙦랃鳵 ˖ 䩧ꐫDPNNJU鎝䜂 • git commit --amend -m "new message”
˖ 殹㛂遤鸏⦐䭸⟂涸儘⦬DPNNJUJE剚佖隶
⤑䰦涸䭸⟂
⤑䰦涸䭸⟂ ˖ "MJBTⴽそ • $ git config --global alias.st status
• --global - 設定別名為使⽤用者 level • st - 別名的名稱 • status - 要被替代的指令 ˖ ⡙縨~/.gitconfig
醳绢♧♴
(JU涸♲⦐ꥣ媯 8PSLJOH%JSFDUPSZ 䊨⡲湡ꏗ 4UBHF *OEFY 程䒸⼦ -PDBM3FQPTJUPSZ 劥㖒⮭㶸䏨 劢鄄鷆髠涸墂呪
佞㖈TUBHF涸墂呪隶刿 䩞〳⟃鄄⸈Ⰵ晝劥䱾ⵖ 鄄晝劥䱾ⵖ涸墂呪
ⴕ佅 ˖ ⴕ佅涸劥颶僽⮭㶸DPNNJUJE涸墂呪⚛尝剤㶸ⴕ 佅♳䨾剤DPNNJU涸麕玑 ˖ 䒊用莅ざ⢘ⴕ佅 ˖ 䘰鱲涸⾲㔔ㄤ㥶⡦鼚⯝ ˖ ざ⢘儘涸遼瑳捀➊랃剚涮欰莅䙦랃鍑对
˖ 搂岁鍑对遼瑳儘銴BCPSU鷎ⴀNFSHF朜䢀
鹎Ⰵ姻겗
齡❉䢫欽涸匌銯 ˖ NBTUFS殹䒊用SFQP儘涸갸鏤涸CSBODIそ珖 ˖ PSJHJO殹䒊用SFNPUF堥㐼儘涸갸鏤そ珖 ˖ 鸏❉鿪〳⟃鄄佖隶
3FNPUF
䖰劥㖒ⵌ黇畮
h(JU5PXFS 䖰8PSLTIPQ㨥ⵌ➛㣔⟃䧮⦛鿪㖈劥㖒畮 ➛㣔䧮⦛㽠銴♳黇畮✫
(JU)VC ˖ 44))5514 ˖ 44)黇畮剤Ⱇꚤ劥㖒畮剤猙ꚤ剤㼩䥰ⵌ㽠〳⟃ 鹎遤⫄鱒 ˖ )5514鷴麕)5514⫄鱒銴䩛⹛鱒Ⰵ䌙贫㺙焺 ˖ 䧴欽(JU)VC䲿⣘涸㹐䨩畮
˖ IUUQTEFTLUPQHJUIVCDPN
䒊用倞㼠呪 ˖ 䖃 ˖ IUUQTHJUIVCDPNOFX ˖ 倞㟞〭⨞HX涸㼠呪 ˖ ⚛䭾♴♴涸$SFBUFSFQPTJUPSZ
鎹⡞鸏⦐笪㖧 〳⟃럊鸏鼹醳醢 鼇)5514
倞㟞SFNPUF⚛QVTI $ cd /to/your/path (略略) $ git remote add origin
[remote URL] $ git push -u origin master // push 時可能需要輸入帳號密碼 ⯓⹛䩛⨞⨞溏 4PVSDF5SFFㄤ(JU)VC溏溏隶⻋
倞㟞SFNPUF⡙縨 ˖ remote鹎遤SFNPUF䭸⟂꧌涸ㄐ⟂ ˖ add倞㟞♧⦐SFNPUF⡙縨 ˖ originSFNPUF⡙縨涸そ珖〳⟃⟤䠑ㄐそ ˖ [remote URL]SFNPUF⡙縨涸63-
$ git remote add origin [remote URL]
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None