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 - I'm lovin' it
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Amir Friedman
March 19, 2013
Programming
200
5
Share
Git - I'm lovin' it
A short presentation about using git for beginners
Amir Friedman
March 19, 2013
More Decks by Amir Friedman
See All by Amir Friedman
Ruby Meta-Programming for beginners
amirf
1
260
Ruby 2.0 Stroll
amirf
3
530
SCM Explained
amirf
2
310
Other Decks in Programming
See All in Programming
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
210
Agent Skills を社内で育てる仕組み作り
jackchuka
1
2.4k
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
1.1k
要はバランスからの卒業 #yumemi_grow
kajitack
0
190
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
710
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
180
関係性から理解する"同一性"の型用語たち
pvcresin
2
510
Agentic AI in the Frontend: Architectures with Open Standards @iJS London 2026
manfredsteyer
PRO
0
100
CSC307 Lecture 17
javiergs
PRO
0
230
継続的な負荷検証を目指して
pyama86
3
1.5k
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.6k
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
3
570
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
2
1k
KATA
mclloyd
PRO
35
15k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
240
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Statistics for Hackers
jakevdp
799
230k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
570
AI: The stuff that nobody shows you
jnunemaker
PRO
7
660
Tell your own story through comics
letsgokoyo
1
930
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Transcript
Git I'm lovin' it!
My University Life
Introducing... Version Control • What changed? • Who changed? •
When did it change? • Why did it change?
Traditional Version Control • SLOW • COMPLICATED to branch •
Branches are COPIES • Merging is ANNOYING • SLOW • Not always free • Requires a centralized server • Can't always work offline A new world of PAIN
Why you should love git
None
Git == AWESOME • FAST • Developers can work offline
• Local Control • Much smaller compared to other repos, e.g: Mozilla (SVN), 30x smaller • Branches carry their entire history • DECENTRALIZED • ANY workflow is possible
How fast? Source: http://git-scm.com/about/small-and-fast pretty fast...
Getting Started
git config --global user.email <email> git config --global user.name <name>
* sometimes, git config --local
git init 8:45 ➜ restaurant> git init Initialized empty Git
repository in /Users/amirf/restaurant/.git/ 8:45 ➜ restaurant git:(master) ✗> Master is not special, it's just the default.
git clone 8:45 ➜ git clone
[email protected]
:funky-repo.git
3 types of files
untracked and not staged
staged
committed (added)
git add --all git add . git add <file>
git status 8:52 ➜ restaurant git:(master) ✗ git status #
On branch master # *snip snip* # # new file: rest_task1.c # 8:54 ➜ restaurant git:(master) ✗
git commit also - git commit -m <message> change last
message - git commit --amend
What is a commit? a 40 digits b107591703f6e5c767ee6bc34c3b19000672be8f SHA
git push git push origin <branch> 8:45 ➜ git push
origin master
What is HEAD? A reference to the last commit in
the current branch
git pull git pull origin <branch> 9:45 ➜ git pull
origin master
Basic Training Complete!
BRANCHING
git branch <name> 9:45 ➜ git branch new-feature
What is a branch? A reference to the head of
work somewhere
git checkout <name> 9:45 ➜ git checkout new-feature Switched to
branch new-feature
git checkout -b <name> Actually wraps: git branch <name> git
checkout <name>
git log [-p]
git diff <file>
git merge <name> 9:45 git:(master) ➜ git merge new-feature 9:45
git:(master) ➜ git merge remotes/origin/new-feature
git stash ➜ git stash save ➜ git stash list
➜ git stash pop ➜ git stash apply stash@{0} ➜ git stash drop stash@{0} the 'stash
git cherry-pick <commit>
git blame <file>
git reset --hard <commit> git reset --soft <commit>
DEMO TIME! Let's create a repository and do some branching,
merging and revet. ...and then let's do it on plugins-repo.
There's more Much, more. clean, fetch, tag, describe, rebase, stash,
revert - and many, many more.
To summerize
Resources Google. Thanks!