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
240
Merciless Refactoring
vc7
0
700
Protocol 的實例、測試和心得
vc7
2
760
共有経済
vc7
0
160
.gitignore
vc7
1
77
Git Workshop 02
vc7
0
94
Escaping Closures in Swift - 公司內分享會
vc7
1
220
Git Workshop 01
vc7
0
160
Other Decks in Programming
See All in Programming
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
testcontainers のススメ
sgash708
1
120
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
150
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
200
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
530
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
920
MCP with Cloudflare Workers
yusukebe
2
220
命名をリントする
chiroruxx
1
380
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
150
Featured
See All Featured
A designer walks into a library…
pauljervisheath
204
24k
Visualization
eitanlees
146
15k
Fireside Chat
paigeccino
34
3.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Site-Speed That Sticks
csswizardry
2
190
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Rails Girls Zürich Keynote
gr2m
94
13k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Optimising Largest Contentful Paint
csswizardry
33
3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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