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
490
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
110
Tyrannosaurus Rx
kouphax
0
110
React
kouphax
2
700
Play for (Java|Scala)
kouphax
0
110
Devops: A Case Study
kouphax
0
68
Scala for C# Developers
kouphax
5
2.6k
Dropwizard - Production Ready Web Services
kouphax
3
1.5k
Scala for Fun & Profit
kouphax
4
610
What Agile Means To Me
kouphax
0
120
Other Decks in Programming
See All in Programming
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
400
Introduction to kotlinx.rpc
arawn
0
630
ARA Ansible for the teams
kksat
0
150
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
360
昭和の職場からアジャイルの世界へ
kumagoro95
1
350
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
200
CNCF Project の作者が考えている OSS の運営
utam0k
5
690
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
Domain-Driven Transformation
hschwentner
2
1.9k
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
Rails アプリ地図考 Flush Cut
makicamel
1
110
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
210
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
50
11k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Site-Speed That Sticks
csswizardry
3
370
Art, The Web, and Tiny UX
lynnandtonic
298
20k
GraphQLとの向き合い方2022年版
quramy
44
13k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Embracing the Ebb and Flow
colly
84
4.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Optimizing for Happiness
mojombo
376
70k
The Cult of Friendly URLs
andyhume
78
6.2k
Designing Experiences People Love
moore
139
23k
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