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
430
From Onboarding to Value Delivering in iOS
vc7
0
250
Merciless Refactoring
vc7
0
730
Protocol 的實例、測試和心得
vc7
2
780
共有経済
vc7
0
160
.gitignore
vc7
1
84
Git Workshop 02
vc7
0
100
Escaping Closures in Swift - 公司內分享會
vc7
1
230
Git Workshop 01
vc7
0
160
Other Decks in Programming
See All in Programming
Node.js, Deno, Bun 最新動向とその所感について
yosuke_furukawa
PRO
5
2.8k
もう一人で悩まない! 個の知見をチームの知見にする3つの習慣と工夫 / Into team knowledge.
honyanya
3
490
Introduction to C Extensions
sylph01
3
150
Compose Navigation実装の見通しを良くする
hiroaki404
0
120
보일러플레이트 코드가 진짜 나쁜 건가요?
gaeun5744
0
330
AIエージェントを活用したアプリ開発手法の模索
kumamotone
1
660
私の愛したLaravel 〜レールを超えたその先へ〜
kentaroutakeda
2
580
はじめてのIssueOps - GitHub Actionsで実現するコメント駆動オペレーション
tmknom
7
2.1k
Accelerate your key learnings of scaling modern Android apps
aldefy
0
220
安全に倒し切るリリースをするために:15年来レガシーシステムのフルリプレイス挑戦記
sakuraikotone
2
580
生産性アップのためのAI個人活用
kunoyasu
0
450
英語文法から学ぶ、クリーンな設計の秘訣
newnomad
1
230
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
511
110k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
22
2.6k
Building an army of robots
kneath
303
45k
Speed Design
sergeychernyshev
28
840
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Making Projects Easy
brettharned
116
6.1k
A Philosophy of Restraint
colly
203
16k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
11
580
The Cost Of JavaScript in 2023
addyosmani
48
7.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Navigating Team Friction
lara
183
15k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
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