![Page 1: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/1.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-Git the basi sBart Trojanowski, bart�jukie.netJukie Networks In .July 9th, 2008
![Page 2: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/2.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Con eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 3: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/3.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Next...Con eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 4: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/4.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Con epts◮ Sour e Control Management
◮ tra k hanges to �les◮ repository / database of hanges◮ working dire tory / urrent state
◮ Centralized SCM◮ server: single database◮ lient: working dire tory & state
◮ De entralized SCM◮ anyone an be a server◮ repository oupled with working dire tory◮ omplete history◮ dis onne ted operation
![Page 5: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/5.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Con epts◮ Sour e Control Management
◮ tra k hanges to �les◮ repository / database of hanges◮ working dire tory / urrent state
◮ Centralized SCM◮ server: single database◮ lient: working dire tory & state
◮ De entralized SCM◮ anyone an be a server◮ repository oupled with working dire tory◮ omplete history◮ dis onne ted operation
![Page 6: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/6.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Con epts◮ Sour e Control Management
◮ tra k hanges to �les◮ repository / database of hanges◮ working dire tory / urrent state
◮ Centralized SCM◮ server: single database◮ lient: working dire tory & state
◮ De entralized SCM◮ anyone an be a server◮ repository oupled with working dire tory◮ omplete history◮ dis onne ted operation
![Page 7: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/7.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 8: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/8.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsWorking tree◮ dire tories◮ �les
![Page 9: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/9.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsRepository ontents◮ �les
a.cv1
![Page 10: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/10.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsRepository ontents◮ �les◮ ommits
a.cv1
b.cv9
metadata
![Page 11: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/11.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsRepository ontents◮ �les◮ ommits◮ an estry
A
B C
E
tim
e
D
![Page 12: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/12.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsdire ted a y li graph�DAG�
A
B C
D
EG
F
H
![Page 13: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/13.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsReferen es◮ tags
A v1.4.4
B C
D
E
v1.5.0
G
F
H
![Page 14: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/14.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsReferen es◮ tags◮ bran hes
A v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
![Page 15: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/15.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsHEAD◮ urrent he kout◮ points to bran h
A v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
HEAD
![Page 16: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/16.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsHEAD◮ urrent he kout◮ points to bran h◮ sometimes deta hed
A v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
HEAD
![Page 17: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/17.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM omponentsIndex◮ �staging area�◮ what is to be ommitted
A v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
index
HEAD
![Page 18: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/18.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 19: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/19.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM operationsBootstrap◮ init◮ he kout◮ swit h bran hModify◮ add, delete, rename◮ ommitInformation◮ status◮ di�◮ logReferen e◮ tag◮ bran h
![Page 20: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/20.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM operationsBootstrap◮ init◮ he kout◮ swit h bran hModify◮ add, delete, rename◮ ommitInformation◮ status◮ di�◮ logReferen e◮ tag◮ bran h
![Page 21: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/21.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM operationsBootstrap◮ init◮ he kout◮ swit h bran hModify◮ add, delete, rename◮ ommitInformation◮ status◮ di�◮ logReferen e◮ tag◮ bran h
![Page 22: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/22.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
SCM operationsBootstrap◮ init◮ he kout◮ swit h bran hModify◮ add, delete, rename◮ ommitInformation◮ status◮ di�◮ logReferen e◮ tag◮ bran h
![Page 23: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/23.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Centralized SCM
A v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
diff
log
update
checkout
commit
◮ operations require server◮ single point of failure◮ bottlene k
![Page 24: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/24.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
more SCM operationsDe entralized
◮ lone◮ pull, fet h◮ push
![Page 25: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/25.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
De entralized SCMpull
pushA v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
clone
A v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
A v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
pull
push
clo
ne
pull
pushclo
ne
◮ anyone an be a server
![Page 26: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/26.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 27: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/27.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
De entralizationupstream
◮ publi repository
![Page 28: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/28.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
De entralizationupstream
local
◮ make a lo al lone
![Page 29: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/29.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
De entralizationupstream
pristine
topic Atopic B
◮ lo al loning is lighweight
![Page 30: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/30.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
De entralizationupstream
pristine
topic Atopic B
◮ push hanges between any repositories
![Page 31: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/31.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
De entralizationupstream web server
pristine
topic Atopic B
◮ publish hanges to publi server
![Page 32: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/32.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
De entralizationupstream web server
pristine
topic Atopic B
another
◮ share hanges with trusted peers
![Page 33: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/33.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Is De entralization any good?◮ non-intrusive mi ro- ommits◮ deta hed operation◮ no single point of failure◮ ba kups are trivial
![Page 34: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/34.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Next...Con eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 35: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/35.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Birth of GIT◮ 2002
◮ Linus uses BitKeeper for tra king Linux◮ BK gets better◮ Linux development s ales better
◮ April 6, 2005◮ BitMover drops free li ense◮ Linus writes his own SCM, GIT
◮ April 18, 2005◮ GIT an merge
◮ June 16, 2005◮ GIT is o� ially used to tra k Linux
◮ Feb 14, 2007◮ GIT 1.5.0 is released◮ major usability e�ort
![Page 36: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/36.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Birth of GIT◮ 2002
◮ Linus uses BitKeeper for tra king Linux◮ BK gets better◮ Linux development s ales better
◮ April 6, 2005◮ BitMover drops free li ense◮ Linus writes his own SCM, GIT
◮ April 18, 2005◮ GIT an merge
◮ June 16, 2005◮ GIT is o� ially used to tra k Linux
◮ Feb 14, 2007◮ GIT 1.5.0 is released◮ major usability e�ort
![Page 37: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/37.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Birth of GIT◮ 2002
◮ Linus uses BitKeeper for tra king Linux◮ BK gets better◮ Linux development s ales better
◮ April 6, 2005◮ BitMover drops free li ense◮ Linus writes his own SCM, GIT
◮ April 18, 2005◮ GIT an merge
◮ June 16, 2005◮ GIT is o� ially used to tra k Linux
◮ Feb 14, 2007◮ GIT 1.5.0 is released◮ major usability e�ort
![Page 38: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/38.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Birth of GIT◮ 2002
◮ Linus uses BitKeeper for tra king Linux◮ BK gets better◮ Linux development s ales better
◮ April 6, 2005◮ BitMover drops free li ense◮ Linus writes his own SCM, GIT
◮ April 18, 2005◮ GIT an merge
◮ June 16, 2005◮ GIT is o� ially used to tra k Linux
◮ Feb 14, 2007◮ GIT 1.5.0 is released◮ major usability e�ort
![Page 39: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/39.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Birth of GIT◮ 2002
◮ Linus uses BitKeeper for tra king Linux◮ BK gets better◮ Linux development s ales better
◮ April 6, 2005◮ BitMover drops free li ense◮ Linus writes his own SCM, GIT
◮ April 18, 2005◮ GIT an merge
◮ June 16, 2005◮ GIT is o� ially used to tra k Linux
◮ Feb 14, 2007◮ GIT 1.5.0 is released◮ major usability e�ort
![Page 40: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/40.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
GIT gets betterAnd then realize that nothing is perfe t. Git is just* loser* to perfe t than any other SCM out there.-Linus
![Page 41: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/41.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Next...Con eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 42: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/42.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 43: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/43.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stru tureA v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
HEAD
repository
the history
![Page 44: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/44.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stru tureA v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
HEAD
repository index100644 20b024 0 bar100644 1d52a6 0 baz100644 20b024 0 sub/fi100644 43dbe0 0 sub/foo
staging area
![Page 45: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/45.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stru tureA v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
HEAD
repository index work tree100644 20b024 0 bar100644 1d52a6 0 baz100644 20b024 0 sub/fi100644 43dbe0 0 sub/foo
.|−− bar|−− baz‘−− sub |−− fi ‘−− foo
�les you edit
![Page 46: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/46.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stru tureA v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
HEAD
repository index work tree100644 20b024 0 bar100644 1d52a6 0 baz100644 20b024 0 sub/fi100644 43dbe0 0 sub/foo
.|−− bar|−− baz‘−− sub |−− fi ‘−− foo
�staging�addremoverename
![Page 47: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/47.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stru tureA v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
HEAD
repository index work tree100644 20b024 0 bar100644 1d52a6 0 baz100644 20b024 0 sub/fi100644 43dbe0 0 sub/foo
.|−− bar|−− baz‘−− sub |−− fi ‘−− foo
� ommitting� ommit
![Page 48: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/48.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stru tureA v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
HEAD
repository index work tree100644 20b024 0 bar100644 1d52a6 0 baz100644 20b024 0 sub/fi100644 43dbe0 0 sub/foo
.|−− bar|−− baz‘−− sub |−− fi ‘−− foo
�reading tree� he koutread-treereset
![Page 49: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/49.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stru tureA v1.4.4
B C
D
E
v1.5.0
G
F
testing
release
topicA
H
HEAD
repository index work tree100644 20b024 0 bar100644 1d52a6 0 baz100644 20b024 0 sub/fi100644 43dbe0 0 sub/foo
.|−− bar|−− baz‘−− sub |−− fi ‘−− foo
� he king out� he kout he kout-indexreset
![Page 50: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/50.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
The repository.git|-- HEAD urrent he kout referen e|-- onfig repo private on�g|-- des ription repo des ription|-- hooks| `-- ... hooking s ripts|-- index hanges to ommit|-- info| |-- ex lude repo private| `-- refs refs?|-- logs| `-- ... �re�og� data|-- obje ts| |-- XX| | `-- ... loose obje ts| |-- info| | `-- pa ks info about pa ks| `-- pa k| `-- ... pa ks and indexes`-- refs|-- heads| `-- master master bran h`-- tags`-- ... tags
![Page 51: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/51.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
The repository.git/ onfig◮ repository on�g.git/des ription◮ des ribes the repositoryuseful for gitweb.git/info/ex lude◮ patterns to ignore
![Page 52: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/52.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
The repository.git/ onfig◮ repository on�g.git/des ription◮ des ribes the repositoryuseful for gitweb.git/info/ex lude◮ patterns to ignore
![Page 53: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/53.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
The repository.git/ onfig◮ repository on�g.git/des ription◮ des ribes the repositoryuseful for gitweb.git/info/ex lude◮ patterns to ignore
![Page 54: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/54.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 55: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/55.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts.git/obje ts|-- 23| `-- d4bd826aba9e29aaa e9411 175b784ed 399|-- 76| `-- 49f82d40a98b1ba59057798e47aab2a99a11d3|-- 4| `-- aaefaa8a48ad4ad379d 1002b78f1a3e4 eab |-- e7| `-- 4be61128eef713459 a4e32398d689fe80864e|-- info| `-- pa ks`-- pa k|-- pa k-b7b026b1a0b0f193db9dea0b0d7367d25d3a68 .idx`-- pa k-b7b026b1a0b0f193db9dea0b0d7367d25d3a68 .pa k
![Page 56: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/56.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts.git/obje ts|-- 23| `-- d4bd826aba9e29aaa e9411 175b784ed 399|-- 76| `-- 49f82d40a98b1ba59057798e47aab2a99a11d3|-- 4| `-- aaefaa8a48ad4ad379d 1002b78f1a3e4 eab |-- e7| `-- 4be61128eef713459 a4e32398d689fe80864e|-- info| `-- pa ks`-- pa k|-- pa k-b7b026b1a0b0f193db9dea0b0d7367d25d3a68 .idx`-- pa k-b7b026b1a0b0f193db9dea0b0d7367d25d3a68 .pa k�loose obje ts�
![Page 57: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/57.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts.git/obje ts|-- 23| `-- d4bd826aba9e29aaa e9411 175b784ed 399|-- 76| `-- 49f82d40a98b1ba59057798e47aab2a99a11d3|-- 4| `-- aaefaa8a48ad4ad379d 1002b78f1a3e4 eab |-- e7| `-- 4be61128eef713459 a4e32398d689fe80864e|-- info| `-- pa ks`-- pa k|-- pa k-b7b026b1a0b0f193db9dea0b0d7367d25d3a68 .idx`-- pa k-b7b026b1a0b0f193db9dea0b0d7367d25d3a68 .pa k�pa k �le�
![Page 58: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/58.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts ontent addressabletype size
data
![Page 59: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/59.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts ontent addressabletype size
data
SHA1
52a0ff44aba8599f43a5d821c421af316cb7305
![Page 60: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/60.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts ontent addressabletype size
data
52a0ff44aba8599f43a5d821c421af316cb7305
![Page 61: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/61.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts ontent addressabletype size
data
52a0ff44aba8599f43a5d821c421af316cb7305
![Page 62: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/62.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts4 types◮ blobs
"blob" size
file data
![Page 63: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/63.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts4 types◮ blobs◮ trees "tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
"tree" size
040000 blob 257cc5... other
![Page 64: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/64.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts4 types◮ blobs◮ trees "tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
![Page 65: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/65.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts4 types◮ blobs◮ trees "tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
"blob" size
file dat
![Page 66: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/66.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts4 types◮ blobs◮ trees◮ ommits "commit" size
tree cad6ae...
parent 6f0104...
author Someone <address>
comitter Another <address>
commit message
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
"blob" size
file dat
"tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
![Page 67: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/67.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts4 types◮ blobs◮ trees◮ ommits "commit" size
tree cad6ae...
parent 6f0104...
author Someone <address>
comitter Another <address>
commit message
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
"blob" size
file dat
"tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
"commit" size
tree cad6ae...
parent 6f0104...
author Someone <address>
comitter Another <address>
commit message
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
"blob" size
file dat
"tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
![Page 68: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/68.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts4 types◮ blobs◮ trees◮ ommits "commit" size
tree cad6ae...
parent 6f0104...
author Someone <address>
comitter Another <address>
commit message
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
"blob" size
file dat
"tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
"commit" size
tree cad6ae...
parent 6f0104...
author Someone <address>
comitter Another <address>
commit message
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
"blob" size
file dat
"tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
"commit" size
tree cad6ae...
parent 6f0104...
author Someone <address>
comitter Another <address>
commit message
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
"blob" size
file dat
"tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
![Page 69: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/69.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje ts4 types◮ blobs◮ trees◮ ommits◮ tags "tag" size
object cad6ae...
type commit
tag tag−name
tagger Who <address> + date
tag message
"commit" size
tree cad6ae...
parent 6f0104...
author Someone <address>
comitter Another <address>
commit message
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
"blob" size
file dat
"tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
"commit" size
tree cad6ae...
parent 6f0104...
author Someone <address>
comitter Another <address>
commit message
"tree" size
040000 blob 257cc5... other
"blob" size
file dat
"blob" size
file dat
"tree" size
040000 tree 205f6b... somedir
100644 blob 9daeaf... somefil
![Page 70: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/70.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje tsimmutabletype size
data
![Page 71: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/71.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje tsimmutabletype size
data
type size
data’
![Page 72: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/72.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje tsimmutabletype size
data
type size
data’
SHA1
8a9fd66b8bb939638564ebfdecc23b5d58070fc8
![Page 73: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/73.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Next...Con eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 74: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/74.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 75: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/75.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Git ommands$ git <options> < ommand> <options>
![Page 76: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/76.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Git ommands (137)add fast-export merge-one-file revertam fast-import merge-resolve rmannotate fet h merge-subtree send-emailapply fet h-pa k merge-tree send-pa kar himport filter-bran h mergetool sh-setupar hive fmt-merge-msg mktag shellbise t for-ea h-ref mktree shortlogblame format-pat h mv showbran h fs k name-rev show-bran hbundle fs k-obje ts pa k-obje ts show-index at-file g pa k-redundant show-ref he k-attr get-tar- ommit-id pa k-refs stash he k-ref-format grep parse-remote status he kout gui pat h-id stripspa e he kout-index hash-obje t peek-remote submodule herry http-fet h prune svn herry-pi k http-push prune-pa ked symboli -ref itool imap-send pull tag lean index-pa k push tar-tree lone init quiltimport unpa k-file ommit init-db read-tree unpa k-obje ts ommit-tree instaweb rebase update-index onfig log re eive-pa k update-ref ount-obje ts lost-found reflog update-server-info vsexport ommit ls-files relink upload-ar hive vsimport ls-remote remote upload-pa k vsserver ls-tree repa k vardaemon mailinfo repo- onfig verify-pa kdes ribe mailsplit request-pull verify-tagdiff merge rerere what hangeddiff-files merge-base reset write-treediff-index merge-file rev-listdiff-tree merge-index rev-parse gitk
![Page 77: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/77.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Every day use. . .add fast-export merge-one-file revertam fast-import merge-resolve rmannotate fet h merge-subtree send-emailapply fet h-pa k merge-tree send-pa kar himport filter-bran h mergetool sh-setupar hive fmt-merge-msg mktag shellbise t for-ea h-ref mktree shortlogblame format-pat h mv showbran h fs k name-rev show-bran hbundle fs k-obje ts pa k-obje ts show-index at-file g pa k-redundant show-ref he k-attr get-tar- ommit-id pa k-refs stash he k-ref-format grep parse-remote status he kout gui pat h-id stripspa e he kout-index hash-obje t peek-remote submodule herry http-fet h prune svn herry-pi k http-push prune-pa ked symboli -ref itool imap-send pull tag lean index-pa k push tar-tree lone init quiltimport unpa k-file ommit init-db read-tree unpa k-obje ts ommit-tree instaweb rebase update-index onfig log re eive-pa k update-ref ount-obje ts lost-found reflog update-server-info vsexport ommit ls-files relink upload-ar hive vsimport ls-remote remote upload-pa k vsserver ls-tree repa k vardaemon mailinfo repo- onfig verify-pa kdes ribe mailsplit request-pull verify-tagdiff merge rerere what hangeddiff-files merge-base reset write-treediff-index merge-file rev-listdiff-tree merge-index rev-parse gitk
![Page 78: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/78.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Some GUI tools. . .add fast-export merge-one-file revertam fast-import merge-resolve rmannotate fet h merge-subtree send-emailapply fet h-pa k merge-tree send-pa kar himport filter-bran h mergetool sh-setupar hive fmt-merge-msg mktag shellbise t for-ea h-ref mktree shortlogblame format-pat h mv showbran h fs k name-rev show-bran hbundle fs k-obje ts pa k-obje ts show-index at-file g pa k-redundant show-ref he k-attr get-tar- ommit-id pa k-refs stash he k-ref-format grep parse-remote status he kout gui pat h-id stripspa e he kout-index hash-obje t peek-remote submodule herry http-fet h prune svn herry-pi k http-push prune-pa ked symboli -ref itool imap-send pull tag lean index-pa k push tar-tree lone init quiltimport unpa k-file ommit init-db read-tree unpa k-obje ts ommit-tree instaweb rebase update-index onfig log re eive-pa k update-ref ount-obje ts lost-found reflog update-server-info vsexport ommit ls-files relink upload-ar hive vsimport ls-remote remote upload-pa k vsserver ls-tree repa k vardaemon mailinfo repo- onfig verify-pa kdes ribe mailsplit request-pull verify-tagdiff merge rerere what hangeddiff-files merge-base reset write-treediff-index merge-file rev-listdiff-tree merge-index rev-parse gitk
![Page 79: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/79.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
O asional use. . .add fast-export merge-one-file revertam fast-import merge-resolve rmannotate fet h merge-subtree send-emailapply fet h-pa k merge-tree send-pa kar himport filter-bran h mergetool sh-setupar hive fmt-merge-msg mktag shellbise t for-ea h-ref mktree shortlogblame format-pat h mv showbran h fs k name-rev show-bran hbundle fs k-obje ts pa k-obje ts show-index at-file g pa k-redundant show-ref he k-attr get-tar- ommit-id pa k-refs stash he k-ref-format grep parse-remote status he kout gui pat h-id stripspa e he kout-index hash-obje t peek-remote submodule herry http-fet h prune svn herry-pi k http-push prune-pa ked symboli -ref itool imap-send pull tag lean index-pa k push tar-tree lone init quiltimport unpa k-file ommit init-db read-tree unpa k-obje ts ommit-tree instaweb rebase update-index onfig log re eive-pa k update-ref ount-obje ts lost-found reflog update-server-info vsexport ommit ls-files relink upload-ar hive vsimport ls-remote remote upload-pa k vsserver ls-tree repa k vardaemon mailinfo repo- onfig verify-pa kdes ribe mailsplit request-pull verify-tagdiff merge rerere what hangeddiff-files merge-base reset write-treediff-index merge-file rev-listdiff-tree merge-index rev-parse gitk
![Page 80: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/80.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
And the plumbing. . .add fast-export merge-one-file revertam fast-import merge-resolve rmannotate fet h merge-subtree send-emailapply fet h-pa k merge-tree send-pa kar himport filter-bran h mergetool sh-setupar hive fmt-merge-msg mktag shellbise t for-ea h-ref mktree shortlogblame format-pat h mv showbran h fs k name-rev show-bran hbundle fs k-obje ts pa k-obje ts show-index at-file g pa k-redundant show-ref he k-attr get-tar- ommit-id pa k-refs stash he k-ref-format grep parse-remote status he kout gui pat h-id stripspa e he kout-index hash-obje t peek-remote submodule herry http-fet h prune svn herry-pi k http-push prune-pa ked symboli -ref itool imap-send pull tag lean index-pa k push tar-tree lone init quiltimport unpa k-file ommit init-db read-tree unpa k-obje ts ommit-tree instaweb rebase update-index onfig log re eive-pa k update-ref ount-obje ts lost-found reflog update-server-info vsexport ommit ls-files relink upload-ar hive vsimport ls-remote remote upload-pa k vsserver ls-tree repa k vardaemon mailinfo repo- onfig verify-pa kdes ribe mailsplit request-pull verify-tagdiff merge rerere what hangeddiff-files merge-base reset write-treediff-index merge-file rev-listdiff-tree merge-index rev-parse gitk
![Page 81: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/81.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Helpgit help◮ list of ommon ommandsgit < ommand> -h◮ brief help outputman git-< ommand>git help < ommand>git < ommand> --help◮ manual page
![Page 82: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/82.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Helpgit help◮ list of ommon ommandsgit < ommand> -h◮ brief help outputman git-< ommand>git help < ommand>git < ommand> --help◮ manual page
![Page 83: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/83.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Helpgit help◮ list of ommon ommandsgit < ommand> -h◮ brief help outputman git-< ommand>git help < ommand>git < ommand> --help◮ manual page
![Page 84: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/84.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Con�guration$HOME/.git onfig$ git onfig --global user.name "Your Name"$ git onfig --global user.email you�domain.tld$ git onfig --global olor.pager true$ git onfig --global olor.ui auto
![Page 85: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/85.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Con�guration$HOME/.git onfig$ git onfig --global user.name "Your Name"$ git onfig --global user.email you�domain.tld$ git onfig --global olor.pager true$ git onfig --global olor.ui auto
![Page 86: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/86.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Con�guration$HOME/.git onfig$ git onfig --global user.name "Your Name"$ git onfig --global user.email you�domain.tld$ git onfig --global olor.pager true$ git onfig --global olor.ui auto
![Page 87: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/87.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Con�guration$ at .git onfig[user℄ name = "Bart Trojanowski"email = "bart�jukie.net"signingkey = 2289688F[ ore℄ pager = less -FRSXeditor = vim[ olor℄ ui = auto[merge℄ tool = vimdiff
![Page 88: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/88.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 89: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/89.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Bootstrapping$ git init
◮ ran in proje t workspa e◮ reates .git dire tory
![Page 90: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/90.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
StagingWhat to ommit?◮ additions$ git add file$ git add .◮ removal$ git rm file◮ renames$ git mv old new
![Page 91: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/91.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
StagingWhat to ommit?◮ additions$ git add file$ git add .◮ removal$ git rm file◮ renames$ git mv old new
![Page 92: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/92.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
StagingWhat to ommit?◮ additions$ git add file$ git add .◮ removal$ git rm file◮ renames$ git mv old new
![Page 93: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/93.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
StagingWhat to ommit?◮ additions$ git add file$ git add .◮ removal$ git rm file◮ renames$ git mv old new
![Page 94: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/94.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Staging$ at .gitignore*.o*~
![Page 95: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/95.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Committing$ git ommit -a -m�some omment�
◮ will reate a ommit of all or only staged items
![Page 96: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/96.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Bootstrapping$ mkdir proje t$ d proje t$ git initworking tree
repository
.git
master
HEAD
index
![Page 97: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/97.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
First ommit$ e ho test > test
working tree
repository
.git
master
HEAD
index
test
![Page 98: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/98.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stage$ e ho test > test$ git add testworking tree
repository
.git
master
HEAD
index
test
tree
52a266...
blob
9daefb... "test"
![Page 99: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/99.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Commit$ e ho test > test$ git add test$ git ommit -m�test�Created initial ommit 6f01040: test1 files hanged, 1 insertions(+),0 deletions(-) reate mode 100644 testworking tree
repository
.git
master
HEAD
commit
6f0104...
index
test
tree
52a266...
blob
9daefb... "test"
![Page 100: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/100.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stage another$ e ho test > test$ git add test$ git ommit -m�test�$ mkdir dir$ e ho foo > dir/foo$ git add dir/fooworking tree
repository
.git
master
HEAD
commit
6f0104...
index
test
tree
52a266...
blob
9daefb...
tree
cad6ae...
blob
257cc5...
tree
205f6b...
dir/foo
"test"
"dir"
"foo"
![Page 101: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/101.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Commit another$ e ho test > test$ git add test$ git ommit -m�test�$ mkdir dir$ e ho foo > dir/foo$ git add dir/foo$ git ommit -m�foo�Created ommit 52a0ff4: foo1 files hanged, 1 insertions(+),0 deletions(-) reate mode 100644 dir/foo working tree
repository
.git
master
HEAD
commit
6f0104...
index
test
tree
52a266...
blob
9daefb...
tree
cad6ae...
blob
257cc5...
tree
205f6b...
commit
52a0ff..
dir/foo
"test"
"dir"
"foo"
![Page 102: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/102.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 103: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/103.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Repository status$ git statusshows. . .
◮ staged◮ unstaged◮ untra ked
![Page 104: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/104.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Di�s$ git diff◮ hanges between index and working �les$ git diff --staged◮ hanges between HEAD and index$ git diff HEAD◮ hanges between HEAD and working �les$ git diff $ ommit $ ommit◮ hanges between two ommits
![Page 105: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/105.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Di�s$ git diff◮ hanges between index and working �les$ git diff --staged◮ hanges between HEAD and index$ git diff HEAD◮ hanges between HEAD and working �les$ git diff $ ommit $ ommit◮ hanges between two ommits
![Page 106: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/106.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Di�s$ git diff◮ hanges between index and working �les$ git diff --staged◮ hanges between HEAD and index$ git diff HEAD◮ hanges between HEAD and working �les$ git diff $ ommit $ ommit◮ hanges between two ommits
![Page 107: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/107.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Di�s$ git diff◮ hanges between index and working �les$ git diff --staged◮ hanges between HEAD and index$ git diff HEAD◮ hanges between HEAD and working �les$ git diff $ ommit $ ommit◮ hanges between two ommits
![Page 108: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/108.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje t referen esspe i� ommit ID. . .full hash 6bb1270ffb60 bfef87266d2d4b4abe4218d9 68short hash 6bb127tag v1.5.6.1lo al bran h masterremote bran h origin/masterby message �:/some text� he kout HEADlast fet h FETCH_HEADprevious head ORIG_HEAD. . .
![Page 109: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/109.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje t referen esa ommit before HEADHEAD^ == HEAD~1
![Page 110: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/110.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje t referen esfew ommits before HEADHEAD^^^ == HEAD~3
![Page 111: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/111.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje t referen esfew ommits before mastermaster^^^ == master~3
![Page 112: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/112.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje t referen eswhat was it yesterday?�{yesterday} == HEAD�{yesterday}
![Page 113: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/113.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje t referen eshow about my-other-bran h on June 1st?my-other-bran h�{June.1}
![Page 114: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/114.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Obje t referen esmaster a few hanges ago?master�{3}
![Page 115: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/115.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Show me!review last ommit. . .$ git show ommit 83b2d051814e884a8e264127ed47552a5d f6 1dAuthor: Bart Trojanowski <bart�jukie.net>Date: Thu Jul 3 21:44:39 2008 -0400 hanged one linediff --git a/test b/testindex 808a2 4..99810fa 100644--- a/test+++ b/test�� -1,3 +1,3 ��Some old text before the hange.-Some text for removal.+Repla ement line.Some old text after the hange.
![Page 116: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/116.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Show me!just the stats. . .$ git show --stat ommit 83b2d051814e884a8e264127ed47552a5d f6 1dAuthor: Bart Trojanowski <bart�jukie.net>Date: Thu Jul 3 21:44:39 2008 -0400 hanged one linetest | 2 +-1 files hanged, 1 insertions(+), 1 deletions(-)
![Page 117: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/117.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Show me!SVN'esq status information. . .$ git show --name-status ommit 3d3d2989b817af3fd4fa6d63f200113bd6 94bdbAuthor: Bart Trojanowski <bart�jukie.net>Date: Thu Jul 3 22:59:13 2008 -0400something more interestingA sub/barD sub/fooM test
![Page 118: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/118.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Show me!review any other ommit. . .$ git show HEAD$ git show HEAD^^^$ git show master~10$ git show master�{May.16}. . .
![Page 119: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/119.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Show me!show a �le (or tree) in history. . .$ git show HEAD:file ontents...
![Page 120: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/120.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
LogsSee ommit history. . .$ git log ommit 3d3d2989b817af3fd4fa6d63f200113bd6 94bdbAuthor: Bart Trojanowski <bart�jukie.net>Date: Thu Jul 3 22:59:13 2008 -0400most re ent ommit ommit 83b2d051814e884a8e264127ed47552a5d f6 1dAuthor: Bart Trojanowski <bart�jukie.net>Date: Thu Jul 3 21:44:39 2008 -0400se ond most re ent ommit 1 1b35a611 39f49842e2 a28d40886 1ae9b7 Author: Bart Trojanowski <bart�jukie.net>Date: Thu Jul 3 21:44:05 2008 -0400middle ommit ommit 411515f51a78d66a27a7d56ebe9f70dbd2bff008Author: Bart Trojanowski <bart�jukie.net>Date: Thu Jul 3 21:43:36 2008 -0400se ond oldest ommit 52a0ff44aba8599f43a5d821 421af316 b73051Author: Bart Trojanowski <bart�jukie.net>Date: Mon Jun 30 21:44:55 2008 -0400oldest ommit. . .
![Page 121: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/121.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Logsgit log is awesome!
![Page 122: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/122.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Logslimit by range. . .$ git log tag..bran h$ git log HEAD~10..$ git log bran h1 bran h2 ^ ommon$ git log -10$ git log -10 master�{yesterday}$ git log --sin e="May 1" --until="June 1"
![Page 123: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/123.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Logslimit by ommit attributes. . .$ git log --author=fred$ git log -- ommitter=joe$ git log --grep=" ommit.*message.*text"
![Page 124: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/124.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Logssear h for a hange. . .$ git log -S"some ode hange"$ git log --pi kaxe-regex -S"some.* ode.* hange"
![Page 125: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/125.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Logslimit by hanges to spe i� path. . .$ git log -- some/file
![Page 126: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/126.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Faster grepanother way to sear h. . .$ git grep -e "pattern" -- some/file$ git grep -e "pattern" bran h -- some/file
![Page 127: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/127.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Faster grepanother way to sear h. . .$ git grep -e "pattern" -- some/file$ git grep -e "pattern" bran h -- some/file
![Page 128: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/128.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 129: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/129.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Referen esthings that point to ommitslightweightmutabledisposable3 basi types
![Page 130: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/130.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Referen esthings that point to ommitslightweightmutabledisposable3 basi types
![Page 131: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/131.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Referen esthings that point to ommitslightweightmutabledisposable3 basi types
![Page 132: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/132.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Referen esthings that point to ommitslightweightmutabledisposable3 basi types
![Page 133: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/133.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Referen esthings that point to ommitslightweightmutabledisposable3 basi types
![Page 134: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/134.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Referen eslo al bran hes
◮ $ git bran h -lbran h1bran h2* master◮ .git/refs/heads/<bran h>
![Page 135: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/135.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Referen estags
◮ $ git tag -ltag1tag2tag3◮ .git/refs/tags/<tag>
![Page 136: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/136.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Referen esremote bran hes
◮ $ git bran h -rfred/masterjoe/masterjoe/another-bran h◮ .git/refs/remotes/<remote>/<bran h>
![Page 137: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/137.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Creating bran hes$ git bran h name ommit
◮ new bran h �name� on HEAD or spe i�ed ommit
![Page 138: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/138.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Swit hing bran hes$ git he kout -f name
◮ he kout �les from �name� bran h◮ optionally for e overwriting hanged �les
![Page 139: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/139.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Create and swit h$ git he kout -b name ommit
◮ he kout �les from �name� bran h
![Page 140: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/140.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Swit hing with hanges$ git he kout nameerror: You have lo al hanges to 'filename'; annot swit h bran hes.$ git he kout -m name
◮ merge outstanding di� onto bran h �name�◮ an result in on�i t
![Page 141: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/141.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Swit hing with hanges$ git he kout nameerror: You have lo al hanges to 'filename'; annot swit h bran hes.$ git he kout -m name
◮ merge outstanding di� onto bran h �name�◮ an result in on�i t
![Page 142: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/142.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesstart at some treemasterA
![Page 143: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/143.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes$ git he kout -b bug-fixmaster
HEAD
bug−fi A
![Page 144: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/144.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes$ git ommit -a -m�B�master
HEAD
Bbug−fi
A
![Page 145: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/145.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes$ git ommit -a -m�C�master
HEAD
C
B
bug−fi
A
![Page 146: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/146.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesyou have a wi ked ideamaster
HEAD
C
B
bug−fi
A
![Page 147: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/147.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesyou have a wi ked idea$ git he kout -b wi ked mastermaster
HEADC
B
bug−fi
wicked
A
![Page 148: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/148.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes$ git ommit -a -m�D�master
HEAD
C
B
D
bug−fi
wicked
A
![Page 149: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/149.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes$ git ommit -a -m�E�master
HEAD
C
B
E
D
bug−fi
wicked
A
![Page 150: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/150.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesyou're getting somewheremaster
HEAD
C
B
E
D
bug−fi
wicked
A
![Page 151: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/151.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesyou're getting somewhere$ git tag -a -m``got somewhere'' goodmaster
HEAD
C
B
goodE
D
bug−fi
wicked
A
![Page 152: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/152.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesmanager asks about the bugmaster
HEAD
C
B
goodE
D
bug−fi
wicked
A
![Page 153: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/153.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesmanager asks about the bug$ git he kout bug-fixmaster
HEAD
C
B
goodE
D
bug−fi
wicked
A
![Page 154: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/154.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes$ git ommit -a -m�F�master
HEAD
F
C
B
goodE
D
bug−fi wicked
A
![Page 155: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/155.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesyour mind is elsewhere. . .master
HEAD
F
C
B
goodE
D
bug−fi wicked
A
![Page 156: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/156.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesyour mind is elsewhere. . .$ git he kout wi kedHEAD
F
C
B
goodE
D
bug−fi wicked
A master
![Page 157: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/157.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes. . . so you �nish o� the wi kedfeature$ git ommit -a -m�G�HEAD
F
G
C
B
goodE
D
bug−fi
wicked
A master
![Page 158: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/158.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesfeature's donebug is �xed. . . time to merge HEAD
F
G
C
B
goodE
D
bug−fi
wicked
A master
![Page 159: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/159.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesfeature's donebug is �xed. . . time to merge HEAD
F
G
C
B
goodE
D
bug−fi
wicked
A master
![Page 160: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/160.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hesfeature's donebug is �xed. . . time to merge HEAD
F
G
C
B
goodE
D
bug−fi
wicked
A master
![Page 161: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/161.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes$ git he kout mastermaster
HEAD
F
G
C
B
goodE
D
bug−fi
wicked
A
![Page 162: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/162.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes$ git reset --hard bug-fixmaster
HEAD
F
G
C
B
goodE
D
bug−fi
wicked
A
![Page 163: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/163.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working on bran hes$ git merge wi kedmaster
HEAD
H
F
G
C
B
goodE
D
bug−fi
wicked
A
![Page 164: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/164.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 165: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/165.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Merging$ git merge <bran h> ...
◮ merge multiple bran hes◮ reates ommit with 2+ parents◮ an ause on�i tsie: require user intervention
![Page 166: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/166.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Mergingone more exampleA
one
![Page 167: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/167.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Mergingtwo topi bran hesA
B C
one two
![Page 168: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/168.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Merging$ git he kout -b three twoA
B C
one twothree
![Page 169: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/169.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Merging$ git he kout -b three two$ git merge oneA
B C
one two
three
D
![Page 170: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/170.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Merging
A
B C
D
E F
Gone two
three
![Page 171: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/171.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Merging$ git he kout threeA
B C
D
E F
Gone two
three
![Page 172: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/172.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Merging$ git he kout three$ git merge one twoA
B C
D
E F
Gone two
three
H
![Page 173: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/173.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Merging$ git he kout three$ git merge one two�o topus�
A
B C
D
E F
Gone two
three
H
![Page 174: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/174.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 175: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/175.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Rebasing$ git rebase <bran h>
◮ moves new work onto a new baseline◮ an ause on�i tsie: require user intervention
![Page 176: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/176.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
Atake two identi al trees
![Page 177: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/177.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
$ git merge master
![Page 178: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/178.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
that's easy
![Page 179: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/179.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
$ git rebase master
![Page 180: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/180.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
E’
D’
$ git rebase master
![Page 181: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/181.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
E’
D’ e
d
$ git rebase master
![Page 182: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/182.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
E’
D’ e
d
$ git rebase master
![Page 183: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/183.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
E’
D’ e
d
$ git rebase master
![Page 184: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/184.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
E’
D’ e
d
$ git rebase master
![Page 185: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/185.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
E’
D’ e
d
$ git rebase master
![Page 186: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/186.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
E
D
master
test
A
F
E’
D’
$ git rebase master
![Page 187: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/187.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
RebasingC
B
E
D
master
test
A
merge rebase
C
B
master
test
A
F
E’
D’
![Page 188: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/188.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 189: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/189.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Cloning$ git lone <remote>
◮ repli ates remote repository◮ populates new repository◮ he ksout new working tree
![Page 190: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/190.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Git URLs◮ lo al repo/home/git/proje t.git/file:///home/git/proje t.git/◮ http proto olhttp://repo.or. z/r/git.git◮ native git proto olgit://repo.or. z/git.git◮ ssh proto olssh://bart�jukie.net/~git/proje t.git/bart�jukie.net/~git/proje t.git/
![Page 191: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/191.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Git URLs◮ lo al repo/home/git/proje t.git/file:///home/git/proje t.git/◮ http proto olhttp://repo.or. z/r/git.git◮ native git proto olgit://repo.or. z/git.git◮ ssh proto olssh://bart�jukie.net/~git/proje t.git/bart�jukie.net/~git/proje t.git/
![Page 192: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/192.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Git URLs◮ lo al repo/home/git/proje t.git/file:///home/git/proje t.git/◮ http proto olhttp://repo.or. z/r/git.git◮ native git proto olgit://repo.or. z/git.git◮ ssh proto olssh://bart�jukie.net/~git/proje t.git/bart�jukie.net/~git/proje t.git/
![Page 193: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/193.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Git URLs◮ lo al repo/home/git/proje t.git/file:///home/git/proje t.git/◮ http proto olhttp://repo.or. z/r/git.git◮ native git proto olgit://repo.or. z/git.git◮ ssh proto olssh://bart�jukie.net/~git/proje t.git/bart�jukie.net/~git/proje t.git/
![Page 194: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/194.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
repo.or.cz
git://repo.or. z/proje t.git
![Page 195: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/195.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
repo.or.cz
$ git lone ssh+git://repo.or. z/proje t.git
![Page 196: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/196.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
repo.or.cz local
$ git lone ssh+git://repo.or. z/proje t.gitInitialize proje t/.gitInitialized empty Git repository in /tmp/proje t/.git/remote: Counting obje ts: 77575, done.remote: Compressing obje ts: 100% (26407/26407), done.remote: Total 77575 (delta 55750), reused 71007 (delta 49775)Re eiving obje ts: 100% (77575/77575), 22.87 MiB | 798 KiB/s, done.Resolving deltas: 100% (55750/55750), done.Che king out files: 100% (1396/1396), done.
![Page 197: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/197.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
repo.or.cz local
$ git lone ssh+git://repo.or. z/proje t.gitInitialize proje t/.gitInitialized empty Git repository in /tmp/proje t/.git/remote: Counting obje ts: 77575, done.remote: Compressing obje ts: 100% (26407/26407), done.remote: Total 77575 (delta 55750), reused 71007 (delta 49775)Re eiving obje ts: 100% (77575/77575), 22.87 MiB | 798 KiB/s, done.Resolving deltas: 100% (55750/55750), done.Che king out files: 100% (1396/1396), done.
![Page 198: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/198.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
repo.or.cz local
$ git lone ssh+git://repo.or. z/proje t.git build-treeInitialize build-tree/.gitInitialized empty Git repository in /tmp/build-tree/.git/remote: Counting obje ts: 77575, done.remote: Compressing obje ts: 100% (26407/26407), done.remote: Total 77575 (delta 55750), reused 71007 (delta 49775)Re eiving obje ts: 100% (77575/77575), 22.87 MiB | 798 KiB/s, done.Resolving deltas: 100% (55750/55750), done.Che king out files: 100% (1396/1396), done.
![Page 199: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/199.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
repo.or.cz local
$ git lone ssh+git://repo.or. z/proje t.gitInitialize proje t/.gitInitialized empty Git repository in /tmp/proje t/.git/remote: Counting obje ts: 77575, done.remote: Compressing obje ts: 100% (26407/26407), done.remote: Total 77575 (delta 55750), reused 71007 (delta 49775)Re eiving obje ts: 100% (77575/77575), 22.87 MiB | 798 KiB/s, done.Resolving deltas: 100% (55750/55750), done.Che king out files: 100% (1396/1396), done.
![Page 200: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/200.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
repo.or.cz local
A v0.1.0
B
C v0.2.0
F
origin/master
$ git lone ssh+git://repo.or. z/proje t.gitInitialize proje t/.gitInitialized empty Git repository in /tmp/proje t/.git/remote: Counting obje ts: 77575, done.remote: Compressing obje ts: 100% (26407/26407), done.remote: Total 77575 (delta 55750), reused 71007 (delta 49775)Re eiving obje ts: 100% (77575/77575), 22.87 MiB | 798 KiB/s, done.Resolving deltas: 100% (55750/55750), done.Che king out files: 100% (1396/1396), done.
![Page 201: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/201.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
repo.or.cz local
A v0.1.0
B
C v0.2.0
F
origin/master
$ git lone ssh+git://repo.or. z/proje t.gitInitialize proje t/.gitInitialized empty Git repository in /tmp/proje t/.git/remote: Counting obje ts: 77575, done.remote: Compressing obje ts: 100% (26407/26407), done.remote: Total 77575 (delta 55750), reused 71007 (delta 49775)Re eiving obje ts: 100% (77575/77575), 22.87 MiB | 798 KiB/s, done.Resolving deltas: 100% (55750/55750), done.Che king out files: 100% (1396/1396), done.
![Page 202: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/202.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
$ git lone ssh+git://repo.or. z/proje t.gitInitialize proje t/.gitInitialized empty Git repository in /tmp/proje t/.git/remote: Counting obje ts: 77575, done.remote: Compressing obje ts: 100% (26407/26407), done.remote: Total 77575 (delta 55750), reused 71007 (delta 49775)Re eiving obje ts: 100% (77575/77575), 22.87 MiB | 798 KiB/s, done.Resolving deltas: 100% (55750/55750), done.Che king out files: 100% (1396/1396), done.
![Page 203: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/203.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo$ git lone ssh+git://repo.or. z/proje t.gitInitialize proje t/.gitInitialized empty Git repository in /tmp/proje t/.git/remote: Counting obje ts: 77575, done.remote: Compressing obje ts: 100% (26407/26407), done.remote: Total 77575 (delta 55750), reused 71007 (delta 49775)Re eiving obje ts: 100% (77575/77575), 22.87 MiB | 798 KiB/s, done.Resolving deltas: 100% (55750/55750), done.Che king out files: 100% (1396/1396), done.
![Page 204: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/204.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo$ git bran h -a* masterorigin/master $ git tag -lv0.1.0v0.2.0
![Page 205: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/205.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo$ git bran h -a* masterorigin/master $ git tag -lv0.1.0v0.2.0
![Page 206: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/206.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo
G
H
![Page 207: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/207.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo
G
H
$ git fet h
![Page 208: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/208.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo
G
H
$ git fet hremote: Counting obje ts: 236, done.remote: Compressing obje ts: 100% (190/190), done.remote: Total 190 (delta 170), reused 0 (delta 0)Re eiving obje ts: 100% (190/190), 69.53 KiB, done.Resolving deltas: 100% (170/170), ompleted with 40 lo al obje ts.From mail.jukie.net:work/o lug/intro-to-git573ff80..06e3703 master -> origin/master
![Page 209: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/209.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo
G
H
$ git fet hremote: Counting obje ts: 236, done.remote: Compressing obje ts: 100% (190/190), done.remote: Total 190 (delta 170), reused 0 (delta 0)Re eiving obje ts: 100% (190/190), 69.53 KiB, done.Resolving deltas: 100% (170/170), ompleted with 40 lo al obje ts.From mail.jukie.net:work/o lug/intro-to-git573ff80..06e3703 master -> origin/master
![Page 210: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/210.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo
G
H
G
H
$ git fet hremote: Counting obje ts: 236, done.remote: Compressing obje ts: 100% (190/190), done.remote: Total 190 (delta 170), reused 0 (delta 0)Re eiving obje ts: 100% (190/190), 69.53 KiB, done.Resolving deltas: 100% (170/170), ompleted with 40 lo al obje ts.From mail.jukie.net:work/o lug/intro-to-git573ff80..06e3703 master -> origin/master
![Page 211: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/211.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo
G
H
G
H
. . . no disk hanges?
![Page 212: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/212.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ ‘−− foo
G
H
G
H
git fet h only updates DAG
![Page 213: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/213.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
git merge origin/masterfast-forwards master to mat h origin/masterand updates the working tree
![Page 214: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/214.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
git merge origin/masterfast-forwards master to mat h origin/masterand updates the working tree
![Page 215: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/215.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
git merge origin/masterfast-forwards master to mat h origin/masterand updates the working tree
![Page 216: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/216.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
git fet h + git merge=git pull
![Page 217: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/217.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
git fet h + git merge=git pull
![Page 218: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/218.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
let's make some lo al ommits
![Page 219: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/219.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
$ git ommit -a -m``I''
![Page 220: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/220.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
I
$ git ommit -a -m``I''Created ommit b618aed: I2 files hanged, 11 insertions(+), 20 deletions(-)
![Page 221: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/221.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
I
![Page 222: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/222.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
I
$ git push
![Page 223: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/223.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
II
$ git pushCounting obje ts: 9, done.Compressing obje ts: 100% (5/5), done.Writing obje ts: 100% (5/5), 810 bytes, done.Total 5 (delta 4), reused 0 (delta 0)refs/heads/master: 9dd 135 -> 15b67 0To ssh+git://repo.or. z/proje t.git9dd 135..15b67 0 master -> master
![Page 224: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/224.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
II
$ git pushCounting obje ts: 9, done.Compressing obje ts: 100% (5/5), done.Writing obje ts: 100% (5/5), 810 bytes, done.Total 5 (delta 4), reused 0 (delta 0)refs/heads/master: 9dd 135 -> 15b67 0To ssh+git://repo.or. z/proje t.git9dd 135..15b67 0 master -> master
![Page 225: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/225.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin" local
A v0.1.0
B
C v0.2.0
F
origin/master
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
G
H
II
![Page 226: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/226.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
foo.com
. . . meanwhile, elsewhere on the internet . . .
![Page 227: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/227.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
foo.com
Fred lones the proje t.
![Page 228: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/228.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
foo.com
G
H
I
Fred lones the proje t.
![Page 229: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/229.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
foo.com
G
H
I
J
. . . and makes some hanges.
![Page 230: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/230.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
foo.com
G
H
I
J
Fred annot push.
![Page 231: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/231.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
foo.com
G
H
I
J
From: fred�foo. omSubje t: I fixed a bugPlease pull fromhttp://foo. om/proje t.git/-Fred
![Page 232: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/232.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
foo.com
G
H
I
J
local
A v0.1.0
B
C v0.2.0
F
ori
gin
/maste
r
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
I
K
From: fred�foo. omSubje t: I fixed a bugPlease pull fromhttp://foo. om/proje t.git/-Fred
![Page 233: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/233.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
foo.com
G
H
I
J
local
A v0.1.0
B
C v0.2.0
F
ori
gin
/maste
r
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
I
K
$ git remote add fred http://foo. om/proje t.git/
![Page 234: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/234.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
foo.com
G
H
I
J
local
A v0.1.0
B
C v0.2.0
F
ori
gin
/maste
r
master
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
H
I
K
$ git remote add fred http://foo. om/proje t.git/
![Page 235: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/235.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
A v0.1.0
B
C v0.2.0
F
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
Hori
gin
/maste
r
master
I
K
$ git remote add fred http://foo. om/proje t.git/
![Page 236: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/236.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
A v0.1.0
B
C v0.2.0
F
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
G
Hori
gin
/maste
r
master
I
K
$ git fet h fred
![Page 237: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/237.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K
$ git fet h fred
![Page 238: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/238.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred
/maste
r
$ git fet h fred
![Page 239: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/239.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred
/maste
r
![Page 240: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/240.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
$ git log fred/master
![Page 241: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/241.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
$ git log fred/master$ git log fred/master ^master
![Page 242: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/242.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
$ git log fred/master$ git log fred/master ^master$ git log -p fred/master ^master
![Page 243: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/243.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
$ git he kout -b fred-fix fred/master
![Page 244: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/244.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
fred−fi
$ git he kout -b fred-fix fred/master
![Page 245: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/245.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
fred−fi
$ git he kout master
![Page 246: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/246.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
fred−fiL
$ git he kout master$ git merge fred-fix
![Page 247: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/247.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
L
$ git he kout master$ git merge fred-fix$ git bran h -d fred-fix
![Page 248: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/248.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
L
$ git push
![Page 249: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/249.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
Hori
gin
/maste
r
master
I
K J
fred/m
aste
r
L
K J
L
$ git push
![Page 250: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/250.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
H
ori
gin
/maste
r master
I
K J
fred/m
aste
r
L
K J
L
$ git push
![Page 251: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/251.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Working with remotesA v0.1.0
B
C v0.2.0
F
master
"origin"
G
H
I
A v0.1.0
B
C v0.2.0
F
master
"fred"
G
H
I
J
local
/tmp/project/|−− .git/|−− bar‘−− sub/ |−− fi ‘−− foo
A v0.1.0
B
C v0.2.0
FG
H
ori
gin
/maste
r master
I
K J
fred/m
aste
r
L
K J
L
![Page 252: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/252.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 253: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/253.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
GUI tools◮ gitksexy view of your revision tree◮ git guiperform trivial tasks from a GUIex: add/rm �les, make ommits, bran h, et
![Page 254: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/254.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
GUI tools◮ gitksexy view of your revision tree◮ git guiperform trivial tasks from a GUIex: add/rm �les, make ommits, bran h, et
![Page 255: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/255.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
gitkhow sexy?
![Page 256: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/256.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
gitk
![Page 257: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/257.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
git-gui
![Page 258: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/258.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 259: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/259.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-Remember loose obje ts ?
![Page 260: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/260.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Loose obje ts.git/obje ts|-- 23| `-- d4bd826aba9e29aaa e9411 175b784ed 399|-- 76| `-- 49f82d40a98b1ba59057798e47aab2a99a11d3|-- 4| `-- aaefaa8a48ad4ad379d 1002b78f1a3e4 eab |-- e7| `-- 4be61128eef713459 a4e32398d689fe80864e|-- info| `-- pa ks`-- pa k|-- pa k-b7b026b1a0b0f193db9dea0b0d7367d25d3a68 .idx`-- pa k-b7b026b1a0b0f193db9dea0b0d7367d25d3a68 .pa k
![Page 261: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/261.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Loose obje ts$ git g Counting obje ts: 636, done.Compressing obje ts: 100% (635/635), done.Writing obje ts: 100% (636/636), done.Total 636 (delta 486), reused 0 (delta 0)Removing dupli ate obje ts: 100% (256/256), done.◮ GC happens automati allywhen you get to 6700 obje ts( on�gurable)
![Page 262: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/262.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Loose obje ts$ git g Counting obje ts: 636, done.Compressing obje ts: 100% (635/635), done.Writing obje ts: 100% (636/636), done.Total 636 (delta 486), reused 0 (delta 0)Removing dupli ate obje ts: 100% (256/256), done.◮ GC happens automati allywhen you get to 6700 obje ts( on�gurable)
![Page 263: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/263.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-Stash
![Page 264: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/264.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stashing◮ you're ha king◮ got debug ode you don't want to ommit◮ need to work on something else
![Page 265: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/265.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stashing◮ you're ha king◮ got debug ode you don't want to ommit◮ need to work on something else
![Page 266: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/266.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stashing◮ you're ha king◮ got debug ode you don't want to ommit◮ need to work on something else
![Page 267: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/267.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stashing◮ git stash �des ription�◮ do that other thing◮ git stash apply
![Page 268: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/268.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stashing◮ git stash �des ription�◮ do that other thing◮ git stash apply
![Page 269: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/269.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Stashing◮ git stash �des ription�◮ do that other thing◮ git stash apply
![Page 270: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/270.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
![Page 271: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/271.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Further readinggit.or. zgit.or. z/gitwikiGitCasts. om(S ott Cha on)
![Page 272: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/272.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Further readinggit.or. zgit.or. z/gitwikiGitCasts. om(S ott Cha on)
![Page 273: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/273.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Further readinggit.or. zgit.or. z/gitwikiGitCasts. om(S ott Cha on)
![Page 274: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/274.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Further readinghttp://www.jukie.net/~bart/blog/git://ta hyon.jukie.net/intro-to-git.git/
![Page 275: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/275.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-
Further readinghttp://www.jukie.net/~bart/blog/git://ta hyon.jukie.net/intro-to-git.git/
![Page 276: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/276.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-Thank you.
![Page 277: crguezl.github.iocrguezl.github.io/apuntes-ruby/intro-to-git.pdf · Git the basics Ba rt T rojano wski, ba rt@jukie.net Concepts SCM comp onents SCM op erations Decentralization GIT](https://reader034.vdocuments.net/reader034/viewer/2022043012/5fa878ac012153694c1327b5/html5/thumbnails/277.jpg)
Git the basi sBartTrojanowski,bart�jukie.netCon eptsSCM omponentsSCM operationsDe entralizationGIT HistoryRepositoryStru tureObje tsUsing GITCommandsCommitInspe tionBran hingMergingRebasingRemotesGUI toolsLoose ends-Q & A