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 For Humans - Holiday Extras - 14/08/2015
Search
Dan Cork
August 14, 2015
Technology
0
240
Git For Humans - Holiday Extras - 14/08/2015
An internal talk introducing git terminology and workflow
Dan Cork
August 14, 2015
Tweet
Share
More Decks by Dan Cork
See All by Dan Cork
Paradox of Choice
dancork
0
34
Unify The UI With React
dancork
0
210
Talking Tech Jan 2016
dancork
0
54
Give CSS3 Some Love / FOWD2015
dancork
0
250
Other Decks in Technology
See All in Technology
TiDBにおけるテーブル設計と最適化の事例
cygames
0
790
DevRelによる信頼構築とデータ駆動で変わるエンジニア採用 / DevRel Trust Building to Data Driven Engineering Hiring
bobtani
1
130
多言語化対応における TypeScript の型定義を通して開発のしやすさについて考えた / TSKaigi TypeScript Multilingualization
nabeliwo
2
380
Blazor WASM × Code-first gRPC で始める C# ⼤統⼀理論
sansantech
PRO
0
250
[2024년 5월 세미나] 생성형 AI와 함께하는 데이터 분석가 커리어
datarian
0
1.2k
【TSkaigi】2024/05/11 当日スライド
kimitashoichi
14
3.9k
スクラムに出会って「できた」を実感できるようになってきた話 / Scrum makes me feel like I can do it
yayoi_dd
2
110
Dungeons and Dragons and Rails
joelq
0
230
「できる!」を増やすGitHub Copilot活用法 / How to use GitHub Copilot to expand your possibilities
sansan_randd
1
240
iThome2024 Wailing Wall of Enterprise Security
notsurprised
0
280
Observabilityジャーニーを実現するためのAWSサービス:OSS編
o11yfes2023
0
110
動画配信サービスのフロントエンド実装に学ぶ設計原則
yud0uhu
1
130
Featured
See All Featured
The Invisible Customer
myddelton
114
12k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
GraphQLとの向き合い方2022年版
quramy
33
13k
Designing the Hi-DPI Web
ddemaree
276
33k
Optimising Largest Contentful Paint
csswizardry
13
2.4k
YesSQL, Process and Tooling at Scale
rocio
165
13k
We Have a Design System, Now What?
morganepeng
43
6.8k
What the flash - Photography Introduction
edds
64
11k
Product Roadmaps are Hard
iamctodd
45
9.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
245
20k
For a Future-Friendly Web
brad_frost
172
9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
67
14k
Transcript
git for humans
What is git
Git is a free and open source distributed version control
system designed to handle everything from small to very large projects with speed and efficiency. http://git-scm.com/
Git is a free and open source distributed version control
system designed to handle everything from small to very large projects with speed and efficiency. http://git-scm.com/
Version Control System (VCS)
Source Control Management (SCM)
collection of files
every change tracked
who
when
why
Mostly used for code
Why do we use it
simultaneous working
easy to rollback
multiple backups multiple locations
Terminology
Setting Up
Repo (Repository)
files & history
None
$ git init
Remote
None
$ git remote
origin sandbox production
origin sandbox production
Clone
None
None
$ git clone {url}
None
None
$ git remote add {alias} {url}
Git is a free and open source distributed version control
system designed to handle everything from small to very large projects with speed and efficiency.
Centralised
Distributed
Starting Your Work
Branch
$ git checkout {branch}
$ git checkout -b {branch}
master
master cool-thing
$ git checkout -b cool-thing
master cool-thing
master cool-thing
$ git checkout -
$ git fetch
Submitting Changes
Diff
$ git diff
- I removed this + and added this
$ git add -p
Stage
$ git add {file}
$ git status
$ git add .
Commit
$ git commit -m “{message}”
Push
$ git push {remote} {branch}
$ git push {remote} {branch}:{remote- branch}
Do some codings Stage changes Commit changes Push to remote
In History Not In History
Staying Up-to-date
Pull
$ git pull {remote} {branch}
Merge
master cool-thing
master cool-thing
$ git merge {branch}
Rebase
master cool-thing
master cool-thing
$ git rebase {branch}
Conflicts
<<<<<<< HEAD my code ======= someone else’s code >>>>>>> master
Merge/Rebase Resolve Conflicts Stage Commit
Rolling Back
Before Staging
$ git checkout {file}
$ git checkout .
Once Staged
Reset
$ git reset
$ git reset --hard
Once Committed
Revert
$ git revert {commit}
$ git log
commit abcdefghijklmnop Author: joeblogg <
[email protected]
> Date: Fri Aug 7 13:19:34
2015 +0100 My super awesome change
commit abcdefghijklmnop Author: joeblogg <
[email protected]
> Date: Fri Aug 7 13:19:34
2015 +0100 My super awesome change
Questions?