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
480
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
100
Tyrannosaurus Rx
kouphax
0
110
React
kouphax
2
690
Play for (Java|Scala)
kouphax
0
100
Devops: A Case Study
kouphax
0
65
Scala for C# Developers
kouphax
5
2.5k
Dropwizard - Production Ready Web Services
kouphax
3
1.5k
Scala for Fun & Profit
kouphax
3
610
What Agile Means To Me
kouphax
0
120
Other Decks in Programming
See All in Programming
gopls を改造したら開発生産性が高まった
satorunooshie
8
240
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.4k
macOS でできる リアルタイム動画像処理
biacco42
7
1.8k
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
970
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
350
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.5k
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.1k
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
4
330
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
830
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
4 Signs Your Business is Dying
shpigford
180
21k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
We Have a Design System, Now What?
morganepeng
50
7.2k
Code Reviewing Like a Champion
maltzj
519
39k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Automating Front-end Workflow
addyosmani
1365
200k
YesSQL, Process and Tooling at Scale
rocio
167
14k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Building Applications with DynamoDB
mza
90
6.1k
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