Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Git 實戰
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
blue chen
September 06, 2013
How-to & DIY
640
8
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git 實戰
For g0v && angularJS Workshop 2013.09
blue chen
September 06, 2013
More Decks by blue chen
See All by blue chen
RelaJet Caption
iamblue
0
170
The future of hearing device - 聽覺領域新的機會及挑戰
iamblue
2
300
20180918-Digitime 導入MCU設計 催熟智慧語音辨識應用市場
iamblue
0
270
Pixnet hackthon - workshop
iamblue
0
170
AI 人工智慧學校分享
iamblue
0
470
Javascript -Full stack 物聯網開發
iamblue
0
190
MCS Lite 私有雲物聯網開發
iamblue
0
350
Blockchain for IoT 應用
iamblue
1
300
2017.01.16 Embedded system
iamblue
0
180
Other Decks in How-to & DIY
See All in How-to & DIY
JAWS/AWS Community Updates in JAWS-UG富山 at 富山高専
awsjcpm
0
120
あなたは何故コミュニティに参加するのか?
awsjcpm
3
440
家を建てて学ぶPjM
rinkei
0
240
タスク管理で人生はもっと楽しくなる
naomik92
2
120
移動は善 / 20260124-NGK2026S
girigiribauer
1
220
MustをWillに変える技術 〜アイドル・郁田はるきが"すべき"の壁を超えるまで〜
subroh0508
1
2.1k
LT#9 非線形な物理現象に基づく真性乱数生成器の構築と、暗号学的エントロピー密度の定量的評価について
sakopon
0
140
AWS Community Builders Update - JAWS-UG Tokyo and Sainokuni
awsjcpm
3
320
JAWS-UG/AWS Community Update - 2026/6/13 JAWS-UG TOHOKU 仙台
awsjcpm
0
1.3k
What's the difference in taste between expensive and cheap mills? Measuring coffee particle size distribution using ImageJ
dogrunjp
0
880
人見知りな HUB おじさんが 会話のハードルを超え、 今度は誰かの踏み台になろうとする話/hub-guy-as-a-stepping-stone
aokiplayer
2
1.3k
終わりのない会議を超えて:HolacracyのTactical Meetingを体験しよう!
andrearc
0
440
Featured
See All Featured
New Earth Scene 8
popppiees
4
2.6k
Skip the Path - Find Your Career Trail
mkilby
1
230
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
Between Models and Reality
mayunak
4
460
Making Projects Easy
brettharned
120
6.8k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
230
Building Applications with DynamoDB
mza
96
7.2k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
We Have a Design System, Now What?
morganepeng
55
8.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Designing for Timeless Needs
cassininazir
1
470
Transcript
Learning Git
YouMeb 悠邁科技 Senior Web Developer & AngularJS Guru I am
Blue
國中生活 Why git? Learning git
1. 想知道別人在昨天修改了哪些地方 2.產品有版本控管需求 3.為了參加零時政府
國中生活 github introdution Learning git
github.com
None
國中生活 git good part Learning git
1. git clone https/git@ 承接專案
1. git add . 2. git commit -am ‘bla..’ 3.
git pull 4. git push
1. git add . git status 檢查改了什麼 2. git commit
-am ‘bla..’ 3. git pull 4. git push
None
國中生活 Branch的概念 Learning git
None
1. git branch 查看所在分支 2. git checkout -b ‘test’ 新增test分支
3. git checkout test 跳到test分支去
git merge ‘分支名稱’ 把別人做的東西抓進來 But..........
直接merge會在這條線上看不到分支記錄 因此要用git merge --no-ff
你做的分支,也可以丟github git push origin ‘分支名’
國中生活 git log Learning git
HEAD^ HEAD~1 HEAD~2 HEAD~3 HEAD~4 注意!HEAD是最前面 mac : HEAD\^
git log --stat 顯示每次commit的東西
git log -p -2 顯示每次commit的東西的詳情 (程式碼,最近兩次) http://git-scm.com/book/zh/Git-%E5%9F%BA%E7%A1%80-%E6%9F%A5%E7%9C %8B%E6%8F%90%E4%BA%A4%E5%8E%86%E5%8F%B2
國中生活 當然...你也可以客製化git log Learning git
git log --graph -- pretty=format:'%s - %Cred %h%Creset %Cgreen(%cr) %Creset
%an' --abbrev- commit --date=relative try that: https://hisea.me/p/git-log-output-formats
國中生活 使用上述常見問題 Learning git
從別人那邊clone,卻推不上github
1. vim .git -> 選擇config 檢查⼀一下路徑
conflict ?!
我要還原!! git reset --hard HEAD(版本)
盡量少用rebase ,reset 請用開分支的方式還原某階段的commit http://ihower.tw/git/rebase.html
阿!!!.... commit 註解寫錯了怎麼辦?
先reset到那個版本,再改commit 1. git reset --soft HEAD\^ 2. git commit -a
-c ORIG_HEAD
git cherry-pick ‘commit 代碼’ 我要不要合併branch 只要合併commit? git cherry-pick -n ‘commit
代碼’
國中生活 git flow / feature branch Learning git
http://blog.wu-boy.com/2011/03/git-%E7%89%88%E6%9C%AC%E6%8E %A7%E5%88%B6-branch-model-%E5%88%86%E6%94%AF %E6%A8%A1%E7%B5%84%E5%9F%BA%E6%9C%AC%E4%BB%8B %E7%B4%B9/ http://nvie.com/posts/a-successful-git-branching-model/ 實戰ref: See:
THANKYOU. FOR YOUR ATTENTION www.facebook.com/iambluechen