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
110
Devops: A Case Study
kouphax
0
67
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
React への依存を最小にするフロントエンド設計
takonda
10
2.3k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.2k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.2k
Jakarta EE meets AI
ivargrimstad
0
170
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Realtime API 入門
riofujimon
0
150
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
900
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Designing Experiences People Love
moore
138
23k
Happy Clients
brianwarren
98
6.7k
We Have a Design System, Now What?
morganepeng
50
7.2k
Gamification - CAS2011
davidbonilla
80
5k
Thoughts on Productivity
jonyablonski
67
4.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