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
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
100
Tyrannosaurus Rx
kouphax
0
95
React
kouphax
2
680
Play for (Java|Scala)
kouphax
0
100
Devops: A Case Study
kouphax
0
60
Scala for C# Developers
kouphax
5
2.5k
Dropwizard - Production Ready Web Services
kouphax
3
1.4k
Scala for Fun & Profit
kouphax
3
610
What Agile Means To Me
kouphax
0
120
Other Decks in Programming
See All in Programming
Java 22 Overview
kishida
1
170
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
180
[SF Ruby, March 2024] Rails on Wasm
palkan
0
380
Javaエンジニアのための Nodejs/Nuxt3入門
hidekatsu_izuno
0
280
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
430
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
190
From Spring Boot 2 to Spring Boot 3 with Java 21 and Jakarta EE
ivargrimstad
0
1.1k
StreamlitとTerraformでデータカタログを作った話
gussan0223
0
300
⼤規模⾔語モデルの拡張(RAG)が 終わったかも知れない件について
nearme_tech
22
15k
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
3
420
코틀린으로 멀티플랫폼 만들기
pangmoo
0
120
SwiftUI Performance 不要なViewの再描画と更新を抑える
bigamitiongit
1
160
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
344
19k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Testing 201, or: Great Expectations
jmmastey
27
6.3k
Agile that works and the tools we love
rasmusluckow
324
20k
A designer walks into a library…
pauljervisheath
199
23k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
In The Pink: A Labor of Love
frogandcode
138
21k
Music & Morning Musume
bryan
41
5.6k
Thoughts on Productivity
jonyablonski
57
3.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
18
1.7k
The Pragmatic Product Professional
lauravandoore
24
5.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
119
38k
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