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
500
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
130
Tyrannosaurus Rx
kouphax
0
120
React
kouphax
2
720
Play for (Java|Scala)
kouphax
0
130
Devops: A Case Study
kouphax
0
82
Scala for C# Developers
kouphax
5
2.6k
Dropwizard - Production Ready Web Services
kouphax
3
1.6k
Scala for Fun & Profit
kouphax
4
640
What Agile Means To Me
kouphax
0
140
Other Decks in Programming
See All in Programming
Devoxx BE - Local Development in the AI Era
kdubois
0
140
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
130
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
360
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
380
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
520
What's new in Spring Modulith?
olivergierke
1
170
Leading Effective Engineering Teams in the AI Era
addyosmani
7
650
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
12
7.2k
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
980
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
310
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
210
モテるデスク環境
mozumasu
3
1.3k
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7.2k
4 Signs Your Business is Dying
shpigford
185
22k
Statistics for Hackers
jakevdp
799
220k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
890
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Automating Front-end Workflow
addyosmani
1371
200k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
We Have a Design System, Now What?
morganepeng
53
7.8k
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