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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
40
Unify The UI With React
dancork
0
240
Talking Tech Jan 2016
dancork
0
61
Give CSS3 Some Love / FOWD2015
dancork
0
280
Other Decks in Technology
See All in Technology
AI開発をスケールさせるデータ中心の仕組みづくり
kzykmyzw
0
180
JuliaTokaiとしてはこれが最後かもしれない(仮) for NGK2026S
antimon2
0
130
Riverpod3.xで実現する実践的UI実装
fumiyasac0921
2
350
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
41k
ゼロから始めたFindy初のモバイルアプリ開発
grandbig
2
460
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
66k
Amazon Bedrock AgentCore 認証・認可入門
hironobuiga
1
390
EventBridge API Destination × AgentCore Runtimeで実現するLambdaレスなイベント駆動エージェント
har1101
7
270
GCASアップデート(202510-202601)
techniczna
0
200
BiDiってなんだ?
tomorrowkey
2
500
セキュリティ はじめの一歩
nikinusu
0
1.1k
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Paper Plane
katiecoart
PRO
0
46k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.8k
Paper Plane (Part 1)
katiecoart
PRO
0
3.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How to train your dragon (web standard)
notwaldorf
97
6.5k
The Language of Interfaces
destraynor
162
26k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
What's in a price? How to price your products and services
michaelherold
247
13k
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?