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: The fast version control system
Search
Gustavo Barbosa
August 01, 2012
Programming
250
0
Share
Git: The fast version control system
A talk about git given to my colleagues at Quatix.
Gustavo Barbosa
August 01, 2012
More Decks by Gustavo Barbosa
See All by Gustavo Barbosa
Arquitetura de Apps em Cenários Offline
barbosa
2
360
Diet View Controllers
barbosa
0
230
CocoaPods: The dependency manager for Objective-C projects
barbosa
0
64
Parse
barbosa
0
140
Introduction to Object
barbosa
0
63
git-flow: a successful branching model
barbosa
4
98
Clean Code
barbosa
0
140
Other Decks in Programming
See All in Programming
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.9k
Alternatives to JPA 2026
debop
0
110
Getting more out of Maven
mlvandijk
0
110
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
320
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
120
アーキテクチャモダナイゼーションとは何か
nwiizo
17
5k
CDK Deployのための ”反響定位”
watany
4
720
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
370
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
260
ハンズオンで学ぶクラウドネイティブ
tatsukiminami
0
120
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
330
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.9k
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
270
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
490
Leo the Paperboy
mayatellez
7
1.6k
GitHub's CSS Performance
jonrohan
1032
470k
BBQ
matthewcrist
89
10k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
RailsConf 2023
tenderlove
30
1.4k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
Being A Developer After 40
akosma
91
590k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
380
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Transcript
git the fast version control system
pull pull pull pull pull pull push push push
getting and creating projects
config configuring your git environment
$ git config --global user.name “Your Name” $ git config
--global user.email “
[email protected]
”
$ git config --global alias.st status $ git config --global
alias.ci commit $ git config --global alias.co checkout $ git config --global alias.br branch
$ git config --global color.ui auto
$ git config --global apply.whitespace nowarn
$ git config --global core.editor “mate -w”
~/.gitconfig
init initializes a directory as a git repository
None
None
None
.! |-- COMMIT_EDITMSG! |-- FETCH_HEAD! |-- HEAD! |-- ORIG_HEAD! |--
branches! |-- config! |-- description! |-- hooks! | |-- applypatch-msg! | |-- commit-msg! | |-- post-commit! | |-- post-receive! | |-- post-update! | |-- pre-applypatch! | |-- pre-commit! | |-- pre-rebase! | |-- prepare-commit-msg! | `-- update! |-- index! |-- info! | `-- exclude! |-- logs! | |-- HEAD! | `-- refs! |-- objects! `-- refs! |-- heads! |-- remotes! |-- stash! `-- tags
clone copy a git repository
None
None
basic snapshotting
add adds file contents to the staging area
None
None
None
None
status view the status of your files in the working
directory and staging area
None
None
diff shows diff of what is staged and what is
modified but unstaged
None
None
commit records a snapshot of the staging area
None
None
$ git commit -m ‘Fix commit msg’ --amend
reset
None
$ git reset --hard
$ git clean -df clean.requireForce defaults to true
rm remove files from the staging area
None
None
! mv rename files in the staging area
None
None
! stash saving temporarily local changes
None
None
branching and merging
branch list, create and manage working contexts
None
None
None
None
None
checkout
$ git checkout <branch> $ git checkout <tag> $ git
checkout <commit> $ git checkout <file>
merge merge a branch context into your current branch
None
None
None
None
None
log show commit history of a branch
None
None
None
None
None
None
None
tag tag a point in history as important
None
None
None
None
sharing and updating projects
remote list, add and delete remote repository aliases
None
None
fetch, pull
$ git fetch <repo> ! $ git fetch --all Download
objects and refs from another repository
$ git pull <repo> <branch>
push
$ git push <repo> <branch>
$ git push <repo> :<branch>
patch
$ git format-patch master --stdout > fix_bug.patch
None
$ git diff HEAD~1 > fix_bug.patch $ git apply fix_bug.patch
rebase
merge vs rebase
merge rebase
reordering commits
$ git rebase -i HEAD~3
None
$ git pull --rebase
$ git config branch.master.rebase true $ git config branch.branch3.rebase true
$ git config branch.autosetuprebase always ! $ git pull --no-rebase
None
None
$ git rebase --continue $ git rebase --abort
inspection and comparison
log
None
None
None
None
$ git rev-list
diff
None
None
None
None
None
None
None
git the fast version control system • http:/ /git-scm.com/ •
http:/ /gitready.com/ • http:/ /gitref.org/ • http:/ /github.com/ • http:/ /bitbucket.org/ • http:/ /progit.org/ • http:/ /stackoverflow.com/ • http:/ /www.arthurkoziel.com/2008/05/02/git-configuration/ • http:/ /www.iconfinder.com/