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
250
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
37
Unify The UI With React
dancork
0
240
Talking Tech Jan 2016
dancork
0
58
Give CSS3 Some Love / FOWD2015
dancork
0
280
Other Decks in Technology
See All in Technology
書籍『実践 Apache Iceberg』の歩き方
ishikawa_satoru
0
410
データとAIで明らかになる、私たちの課題 ~Snowflake MCP,Salesforce MCPに触れて~ / Data and AI Insights
kaonavi
0
220
アウトプットから始めるOSSコントリビューション 〜eslint-plugin-vueの場合〜 #vuefes
bengo4com
3
1.9k
datadog-incident-management-intro
tetsuya28
0
110
SREのキャリアから経営に近づく - Enterprise Risk Managementを基に -
shonansurvivors
1
630
知覚とデザイン
rinchoku
1
710
新米エンジニアをTech Leadに任命する ー 成長を支える挑戦的な人と組織のマネジメント
naopr
1
340
InsightX 会社説明資料/ Company deck
insightx
0
150
プロダクト開発と社内データ活用での、BI×AIの現在地 / Data_Findy
sansan_randd
1
730
Okta Identity Governanceで実現する最小権限の原則
demaecan
0
230
[Journal club] Thinking in Space: How Multimodal Large Language Models See, Remember, and Recall Spaces
keio_smilab
PRO
0
110
Raycast AI APIを使ってちょっと便利なAI拡張機能を作ってみた
kawamataryo
0
230
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Testing 201, or: Great Expectations
jmmastey
46
7.7k
Navigating Team Friction
lara
190
15k
Typedesign – Prime Four
hannesfritz
42
2.8k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Producing Creativity
orderedlist
PRO
348
40k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
Done Done
chrislema
186
16k
How STYLIGHT went responsive
nonsquared
100
5.9k
Gamification - CAS2011
davidbonilla
81
5.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
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?