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 For Humans - Holiday Extras - 14/08/2015
Search
Dan Cork
August 14, 2015
Technology
0
240
Git For Humans - Holiday Extras - 14/08/2015
An internal talk introducing git terminology and workflow
Dan Cork
August 14, 2015
Tweet
Share
More Decks by Dan Cork
See All by Dan Cork
Paradox of Choice
dancork
0
34
Unify The UI With React
dancork
0
210
Talking Tech Jan 2016
dancork
0
54
Give CSS3 Some Love / FOWD2015
dancork
0
250
Other Decks in Technology
See All in Technology
生産性向上チームの紹介
cybozuinsideout
PRO
1
860
ServiceNow Knowledge 24の歩き方 EYストラテジー・アンド・コンサルティング
manarobot
0
190
長期運用プロジェクトでのMySQLからTiDB移行の検証
colopl
2
840
Cracking the KubeCon CfP
inductor
2
230
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
200
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
0
2.6k
テストプロセスで大事にしていること #jasstnano
makky_tyuyan
0
160
プロデザ! BY リクルート vol.18_リクルートのリサーチ実践組織「リサーチブーストコミュニティ」
recruitengineers
PRO
3
280
20240418_Google ColabにLLMが搭載されたようなのでPython x データ分析の勉強方法を考えてみる
doradora09
0
120
反実仮想機械学習とは何か
usaito
PRO
11
4k
MapLibreとAmazon Location Service
dayjournal
1
150
VS CodeでAWSを操作しよう
smt7174
7
1.6k
Featured
See All Featured
Visualization
eitanlees
136
14k
The Brand Is Dead. Long Live the Brand.
mthomps
49
28k
Thoughts on Productivity
jonyablonski
58
3.8k
A Tale of Four Properties
chriscoyier
151
22k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
241
1.2M
Agile that works and the tools we love
rasmusluckow
325
20k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
20
1.9k
GraphQLの誤解/rethinking-graphql
sonatard
50
9.2k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
Designing for Performance
lara
601
67k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Into the Great Unknown - MozCon
thekraken
10
990
Transcript
git for humans
What is git
Git is a free and open source distributed version control
system designed to handle everything from small to very large projects with speed and efficiency. http://git-scm.com/
Git is a free and open source distributed version control
system designed to handle everything from small to very large projects with speed and efficiency. http://git-scm.com/
Version Control System (VCS)
Source Control Management (SCM)
collection of files
every change tracked
who
when
why
Mostly used for code
Why do we use it
simultaneous working
easy to rollback
multiple backups multiple locations
Terminology
Setting Up
Repo (Repository)
files & history
None
$ git init
Remote
None
$ git remote
origin sandbox production
origin sandbox production
Clone
None
None
$ git clone {url}
None
None
$ git remote add {alias} {url}
Git is a free and open source distributed version control
system designed to handle everything from small to very large projects with speed and efficiency.
Centralised
Distributed
Starting Your Work
Branch
$ git checkout {branch}
$ git checkout -b {branch}
master
master cool-thing
$ git checkout -b cool-thing
master cool-thing
master cool-thing
$ git checkout -
$ git fetch
Submitting Changes
Diff
$ git diff
- I removed this + and added this
$ git add -p
Stage
$ git add {file}
$ git status
$ git add .
Commit
$ git commit -m “{message}”
Push
$ git push {remote} {branch}
$ git push {remote} {branch}:{remote- branch}
Do some codings Stage changes Commit changes Push to remote
In History Not In History
Staying Up-to-date
Pull
$ git pull {remote} {branch}
Merge
master cool-thing
master cool-thing
$ git merge {branch}
Rebase
master cool-thing
master cool-thing
$ git rebase {branch}
Conflicts
<<<<<<< HEAD my code ======= someone else’s code >>>>>>> master
Merge/Rebase Resolve Conflicts Stage Commit
Rolling Back
Before Staging
$ git checkout {file}
$ git checkout .
Once Staged
Reset
$ git reset
$ git reset --hard
Once Committed
Revert
$ git revert {commit}
$ git log
commit abcdefghijklmnop Author: joeblogg <
[email protected]
> Date: Fri Aug 7 13:19:34
2015 +0100 My super awesome change
commit abcdefghijklmnop Author: joeblogg <
[email protected]
> Date: Fri Aug 7 13:19:34
2015 +0100 My super awesome change
Questions?