Version Control with
pt.1
$ whoami

●   Renato Oliveira
●   @_renatoOliveira
●   renato@labcodes.com.br
●   CIn/UFPE/GPRT
●   LabCodes/Mobdoctor
●   python/django
●   pug-pe, python-brasil, django-brasil
●   pythonNordeste 2013, May 24-25
Intro

● Distributed revision control software

● Open-source

● Written in C

● Multi platform
Linus Torvalds
Junio Hamano
Tech Talk about Git



http://www.youtube.com/watch?v=4XpnKHJAok8
Shared!
Distributed!
Basic Commands

config

● git config --global user.name "Your Name"

● git config --global user.email "Your E-mail"

● git config --global color.ui true
Basic Commands
creating a repository

● git init

cloning a repository

● git clone repo_url
Basic Commands
Add a file

● git add path/to/file

Commit a file

● git commit
or
● git commit -m "commit message"
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...
Add a remote repository




● git remote add repository_name url
Upload your code




● git push repository_name branch_name
Updating your code




git pull repository_name branch_name
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
Merging




● git checkout branch_name

● git merge another_branch_name
questions?
@_renatoOliveira
renato@labcodes.com.br

Controle de versão com git