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 Basics
Search
James Hughes
June 22, 2012
Programming
15
510
Git Basics
James Hughes
June 22, 2012
Tweet
Share
More Decks by James Hughes
See All by James Hughes
Functional Programming with Clojure
kouphax
1
150
Tyrannosaurus Rx
kouphax
0
130
React
kouphax
2
740
Play for (Java|Scala)
kouphax
0
140
Devops: A Case Study
kouphax
0
94
Scala for C# Developers
kouphax
5
2.7k
Dropwizard - Production Ready Web Services
kouphax
3
1.6k
Scala for Fun & Profit
kouphax
4
650
What Agile Means To Me
kouphax
0
160
Other Decks in Programming
See All in Programming
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
1
400
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.4k
文字コードの話
qnighy
43
17k
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
12
7.4k
SourceGeneratorのマーカー属性問題について
htkym
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
370
Ruby x Terminal
a_matsuda
5
560
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
120
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
420
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
230
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
290
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Design in an AI World
tapps
0
160
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
210
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
230
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
4 Signs Your Business is Dying
shpigford
187
22k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
350
Transcript
Git Basics
version control noun Computing the task of keeping a software
system consisting of many versions and configurations well organised.
Centralised (e.g. Subversion)
1 source of truth 1 point of failure
Distributed (e.g. Git, Mercurial)
No 1 source of truth No 1 point of failure
Commands (for day-to-day activities)
init clone add commit remote push stash revert log branch
checkout merge
Staging (the fundamental git concept)
working directory staging area/index repository add commit
Helping Hands (log, diff & status)
log diff status Show commit logs Show changes between commits
Show the working tree status
.gitignore (excluding files you don’t need)
.gitignore bin/ obj/ *.tmp
Workflows (super simple, happy path git usage)
Create or copy a repo Committing code Pulling code Pushing
code Feature branches Backing out changes
init/clone add commit push Super Simple Git Workflow For the
lone wolf
Super Simple Team Workflow For the hyper agile team init/clone
add/commit pull push
stash push add commit init/clone pull stash apply Team Workflow
Pulling mid-commit
Feature Branches Short Lived, Isolated Sandboxes add/commit branch push checkout
merge checkout init/clone
Undoing Changes (checkout, reset & revert)
checkout <file> reset HEAD <file> revert HEAD Revert uncommitted changes
Revert staged changes Revert committed changes
/Git Basics