controle de versão com git
TRANSCRIPT
![Page 1: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/1.jpg)
Version Control with
![Page 2: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/2.jpg)
pt.1
![Page 3: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/3.jpg)
● Renato Oliveira● @_renatoOliveira● [email protected]● CIn/UFPE/GPRT● LabCodes/Mobdoctor ● python/django● pug-pe, python-brasil, django-brasil● pythonNordeste 2013, May 24-25
$ whoami
![Page 4: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/4.jpg)
Intro
● Distributed revision control software
● Open-source
● Written in C
● Multi platform
![Page 5: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/5.jpg)
Linus Torvalds
![Page 6: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/6.jpg)
Junio Hamano
![Page 7: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/7.jpg)
Tech Talk about Git
http://www.youtube.com/watch?v=4XpnKHJAok8
![Page 8: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/8.jpg)
Shared!
![Page 9: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/9.jpg)
Distributed!
![Page 10: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/10.jpg)
Basic Commands
config
● git config --global user.name "Your Name"
● git config --global user.email "Your E-mail"
● git config --global color.ui true
![Page 11: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/11.jpg)
Basic Commands
creating a repository
● git init
cloning a repository
● git clone repo_url
![Page 12: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/12.jpg)
Basic Commands
Add a file
● git add path/to/file
Commit a file
● git commitor● git commit -m "commit message"
![Page 13: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/13.jpg)
Difference between Svn commit and git commit
● Git commits are locals!● Local repositories are git repositories.● No Internet needed!● You don't need public access to the
repository!● So, to a better version control...
![Page 14: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/14.jpg)
![Page 15: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/15.jpg)
Add a remote repository
● git remote add repository_name url
![Page 16: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/16.jpg)
Upload your code
● git push repository_name branch_name
![Page 17: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/17.jpg)
Updating your code
git pull repository_name branch_name
![Page 18: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/18.jpg)
Git branching
Every local repository is a branch.but branching is a good practice.
● git branch branch_name
● git checkout branch_name
● git branch -D branch_name
![Page 19: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/19.jpg)
Merging
● git checkout branch_name
● git merge another_branch_name
![Page 20: Controle de versão com git](https://reader031.vdocuments.us/reader031/viewer/2022020122/5549ff2bb4c905557a8b4e88/html5/thumbnails/20.jpg)
questions?