Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Git Basics
James Hughes
June 22, 2012
Programming
15
470
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
88
Tyrannosaurus Rx
kouphax
0
74
React
kouphax
2
650
Play for (Java|Scala)
kouphax
0
88
Devops: A Case Study
kouphax
0
55
Scala for C# Developers
kouphax
5
2.5k
Dropwizard - Production Ready Web Services
kouphax
3
1.3k
Scala for Fun & Profit
kouphax
3
600
What Agile Means To Me
kouphax
0
110
Other Decks in Programming
See All in Programming
YATA: collaborative documents and how to make them fast
horusiath
1
170
WindowsコンテナDojo: 第4回 Red Hat OpenShift Localを使ってみよう
oniak3ibm
PRO
0
190
サーバーレスパターンから学ぶデータ分析基盤構築 / devio2022
kasacchiful
0
510
ベストプラクティス・ドリフト
sssssssssssshhhhhhhhhh
1
220
SwiftUIで「意図」を伝える / swiftui_intention
uhooi
2
150
ExplainableAIの概要とAmazon SageMaker Clarifyでの実装例
hacarus
0
110
There's an API for that!
mariatta
PRO
0
110
Efficient UI testing in Android
alexzhukovich
2
130
Untangling Coroutine Testing (Droidcon Berlin 2022)
zsmb
2
490
Edge Side Frontend という新領域
mizchi
24
10k
2022 - COSCUP - 打造高速 Ruby 專案開發流程
elct9620
0
100
ストア評価「2.4」だったCOCOARアプリを1年で「4.4」になんとかした方法@Cloud CIRCUS Meetup #2
1901drama
0
190
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
62
7.3k
Keith and Marios Guide to Fast Websites
keithpitt
404
21k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
107
16k
Writing Fast Ruby
sferik
612
57k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
236
1.1M
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
21
1.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
151
13k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
351
21k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
316
19k
Rails Girls Zürich Keynote
gr2m
87
12k
Bootstrapping a Software Product
garrettdimon
296
110k
Web development in the modern age
philhawksworth
197
9.3k
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