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
0
240
Git: The fast version control system
A talk about git given to my colleagues at Quatix.
Gustavo Barbosa
August 01, 2012
Tweet
Share
More Decks by Gustavo Barbosa
See All by Gustavo Barbosa
Arquitetura de Apps em Cenários Offline
barbosa
2
340
Diet View Controllers
barbosa
0
220
CocoaPods: The dependency manager for Objective-C projects
barbosa
0
59
Parse
barbosa
0
130
Introduction to Object
barbosa
0
56
git-flow: a successful branching model
barbosa
4
94
Clean Code
barbosa
0
130
Other Decks in Programming
See All in Programming
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
110
Conquering Massive Traffic Spikes in Ruby Applications with Pitchfork
riseshia
0
160
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
810
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
350
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
280
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
220
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
2.7k
CSC305 Lecture 06
javiergs
PRO
0
210
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
200
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
1.9k
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
120
Web Components で実現する Hotwire とフロントエンドフレームワークの橋渡し / Bridging with Web Components
da1chi
3
2k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Six Lessons from altMBA
skipperchong
28
4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Optimizing for Happiness
mojombo
379
70k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Unsuck your backbone
ammeep
671
58k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
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/