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
250
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
36
Unify The UI With React
dancork
0
220
Talking Tech Jan 2016
dancork
0
56
Give CSS3 Some Love / FOWD2015
dancork
0
260
Other Decks in Technology
See All in Technology
オブザーバビリティの観点でみるAWS / AWS from observability perspective
ymotongpoo
7
1k
事業継続を支える自動テストの考え方
tsuemura
0
300
君はPostScriptなウィンドウシステム 「NeWS」をご存知か?/sunnews
koyhoge
0
720
WAF に頼りすぎない AWS WAF 運用術 meguro sec #1
izzii
0
460
The 5 Obstacles to High-Performing Teams
mdalmijn
0
270
スタートアップ1人目QAエンジニアが QAチームを立ち上げ、“個”からチーム、 そして“組織”に成長するまで / How to set up QA team at reiwatravel
mii3king
1
1.1k
SCSAから学ぶセキュリティ管理
masakamayama
0
140
Tech Blogを書きやすい環境づくり
lycorptech_jp
PRO
0
120
プロセス改善による品質向上事例
tomasagi
1
1.6k
AWSでRAGを実現する上で感じた3つの大事なこと
ymae
3
1k
Larkご案内資料
customercloud
PRO
0
600
エンジニアのためのドキュメント力基礎講座〜構造化思考から始めよう〜(2025/02/15jbug広島#15発表資料)
yasuoyasuo
15
5.5k
Featured
See All Featured
Designing for Performance
lara
604
68k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
How to train your dragon (web standard)
notwaldorf
90
5.8k
RailsConf 2023
tenderlove
29
1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Designing Experiences People Love
moore
139
23k
Gamification - CAS2011
davidbonilla
80
5.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
8
270
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?