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 For Humans - Holiday Extras - 14/08/2015
Search
Dan Cork
August 14, 2015
Technology
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git For Humans - Holiday Extras - 14/08/2015
An internal talk introducing git terminology and workflow
Dan Cork
August 14, 2015
Transcript
92 slides
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?
More Decks by Dan Cork
See All by Dan Cork
Paradox of Choice
dancork
0
49
Unify The UI With React
dancork
0
280
Talking Tech Jan 2016
dancork
0
76
Give CSS3 Some Love / FOWD2015
dancork
0
300
Other Decks in Technology
See All in Technology
統制されたID・権限をどう利用するか : DPoP/FAPIによるAPIセキュリティ強化
oidfj
2
300
共通基盤の実装に Kotlin - Quarkus を選定した理由と採用したアーキテクチャ
nealle
1
160
プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript
timakin
2
800
OpenTelemetryで変わった 新時代のCloudWatchメトリクス監視
tsukuboshi
0
500
メディアアートを〈拡張〉する——器官学と個体化論を手がかりに
_kotobuki_
0
190
専門家に使ってもらうAIプロダクトをつくる - 病院の医事課向けDPCコーディング支援システムの設計と評価
hagino3000
4
1k
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
3
490
成長するID管理基盤における運用もコストも犠牲にしないオブザーバビリティ向上の実践 / Improving Observability for a Growing Identity Platform Without Adding Operational Burden or Cost
kaminashi
1
130
Well, that’s weird…
csswizardry
1
210
[関西Kaggler会 20261113] 続・コミュニティコンペのススメ
nejumi
0
200
gradle-best-practices 使ってみた
mikanichinose
0
230
業務の傍らで進める改善ループエンジニアリング
bengo4com
1
240
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
48k
Thoughts on Productivity
jonyablonski
76
5.5k
Test your architecture with Archunit
thirion
2
2.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
340
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
590
Designing for Timeless Needs
cassininazir
1
570
Tell your own story through comics
letsgokoyo
1
1.1k
The Limits of Empathy - UXLibs8
cassininazir
2
800
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
540
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.3k