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
89
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
390
From Onboarding to Value Delivering in iOS
vc7
0
220
Merciless Refactoring
vc7
0
600
Protocol 的實例、測試和心得
vc7
2
690
共有経済
vc7
0
120
.gitignore
vc7
1
64
Git Workshop 02
vc7
0
80
Escaping Closures in Swift - 公司內分享會
vc7
1
190
Git Workshop 01
vc7
0
140
Other Decks in Programming
See All in Programming
PostmanでAPIの動作確認が楽になった話
h455h1
0
170
Code Reviews
bkuhlmann
4
890
Elm 0.19.0 Changes
bkuhlmann
0
490
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
AWS CDKコントリビュートTIPS / aws-cdk-contribution-tips
gotok365
2
200
Node.js v22 で変わること
yosuke_furukawa
PRO
9
3.5k
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
340
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
710
Java 22 Overview
kishida
1
180
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
180
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
190
ゆるい個人開発のススメ
kuroppe1819
10
990
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
260
12k
Music & Morning Musume
bryan
41
5.6k
Fireside Chat
paigeccino
21
2.6k
Web Components: a chance to create the future
zenorocha
305
41k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
How to Ace a Technical Interview
jacobian
272
22k
What's new in Ruby 2.0
geeforr
337
31k
Visualization
eitanlees
136
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
Practical Orchestrator
shlominoach
182
9.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
121
39k
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