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
57
Give CSS3 Some Love / FOWD2015
dancork
0
270
Other Decks in Technology
See All in Technology
Amazon Q Developer for GitHubとAmplify Hosting でサクッとデジタル名刺を作ってみた
kmiya84377
0
3.5k
OAuth/OpenID Connectで実現するMCPのセキュアなアクセス管理
kuralab
5
610
_第3回__AIxIoTビジネス共創ラボ紹介資料_20250617.pdf
iotcomjpadmin
0
130
原則から考える保守しやすいComposable関数設計
moriatsushi
3
480
Кто отправит outbox? Валентин Удальцов, автор канала Пых
lamodatech
0
180
CI/CDとタスク共有で加速するVibe Coding
tnbe21
0
220
Amplifyとゼロからはじめた AIコーディング 成果と展望
mkdev10
1
330
BigQuery Remote FunctionでLooker Studioをインタラクティブ化
cuebic9bic
2
160
API の仕様から紐解く「MCP 入門」 ~MCP の「コンテキスト」って何だ?~
cdataj
0
170
TODAY 看世界(?) 是我們在看扣啦!
line_developers_tw
PRO
0
860
"SaaS is Dead" は本当か!? 生成AI時代の医療 Vertical SaaS のリアル
kakehashi
PRO
3
250
OpenTelemetry Collector internals
ymotongpoo
6
570
Featured
See All Featured
Faster Mobile Websites
deanohume
307
31k
Designing for humans not robots
tammielis
253
25k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Become a Pro
speakerdeck
PRO
28
5.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Why Our Code Smells
bkeepers
PRO
337
57k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Raft: Consensus for Rubyists
vanstee
140
7k
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?