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
360
Diet View Controllers
barbosa
0
230
CocoaPods: The dependency manager for Objective-C projects
barbosa
0
62
Parse
barbosa
0
130
Introduction to Object
barbosa
0
62
git-flow: a successful branching model
barbosa
4
97
Clean Code
barbosa
0
130
Other Decks in Programming
See All in Programming
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
340
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
510
Ruby and LLM Ecosystem 2nd
koic
0
250
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
210
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
120
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
650
Claude Code Skill入門
mayahoney
0
100
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
370
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
520
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
390
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
320
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
210
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
780
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.8k
Embracing the Ebb and Flow
colly
88
5k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.4k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
82
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
The SEO Collaboration Effect
kristinabergwall1
0
380
How to Ace a Technical Interview
jacobian
281
24k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
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/