ao
Git é um sistema distribuído de controle de versão livre e de código aberto projetado para lidar com tudo, desde pequenos a grandes projetos com velocidade e eficiência.
Git é fácil de aprender e tem um desempenho surpreendente rápido. Ele supera ferramentas de controle de versão como Subversion, TFS, CVS.
Github é uma serviço/rede social que utiliza o git como ferramenta.
Tem outros serviços?
Bitbucket
Visual Studio Online
CodePlex
GitLab
Gitorious
$ git clone https://github.com/felipefdl/test.git
$ cd project_folder$ git init$ git remote add origin https://github.com/felipefdl/test.git
$ git remote remove origin$ git remote add origin https://github.com/felipefdl/test.git
O .gitignore é um arquivo onde escrevemos nomes de arquivos, diretorios e patterns (regex).
Onde ele ignora os mesmo para não subir para repositorio.
$ echo "hello git" > teste.txt$ git add teste.txt$ git commit -m "Adcionado um novo arquivo, teste.txt"
$ echo "hello again git" > teste2.txt$ git add teste2.txt$ git commit -m "Adicionado outro novo arquivo, teste2.txt"
$ git push origin master
$ git pull origin master$ git status$ git checkout -b PBI3040
$ git branch
$ git checkout master
$ git branch -d PBI3040 $ git merge PBI3050