30

Git

  • Upload
    distbp

  • View
    776

  • Download
    2

Embed Size (px)

DESCRIPTION

 

Citation preview

Mas o que é GIT?

GIT é uma ferramenta de SCM ( Software Configuration Management), ou seja, é um sofware para controle de versão e gereciamento de mudanças.

Começando.

Repositórios

Locais

Remotos

Repositórios

Repositórios

KEY

ssh-keygen -t rsa -C "[email protected]

Repositórios

Git init

Git clone <REPOSITORIO>

Ciclo de Vida do Arquivo

Conectando Repositórios

git push -u master

git remote add origin https://github.com/MasterRoots/gitBP.git

PUSH e PULL

git push

git pull

BRANCHBRANCH

git branch <NAME>

BRANCH

git push <REPO> <BRANCH>

git push -u <REPO> <branch>

git branch -r

git branch -t design origin/design

BRANCH

MERGE

AUTO-MERGING

MERGEProcesso de Merge Manual:

git pullgit status

Modificações...

git add file.txtgit commit -m “merge manual”git push

Boas Práticas

Boas Práticas e Rebase

Para o desenvolvimento, NÃO trabalhar com a Branch master/origin. Criar uma Branch local para desenvolvimento.

git checkout -b desenvolvimento

Boas Práticas e Rebase

git checkout master

git pull

Boas Práticas e Rebase

git checkout desenvolvimento

git rebase master

Boas Práticas e Rebase

Boas Práticas e Rebase

Boas Práticas e Rebase

git checkout mastergit merge desenvolvimentogit push

Mas e se o rebase falhar?

Abort, Skip e Continue

git rebase --abortgit rebase --skipgit statusCorreções nos arquivos...git add file.txtgit status

git rebase --continuegit checkout mastergit merge desenvolvimentogit push

Contribuições

Fork

Pull Request

SVN X GIT - Distribuido; - Velocidade; - Backup; - Segurança; - Trabalho offline; - Descentralizado; - Merge, Branches facilitados e mais confiáveis;

Interfaces VisuaisTortoise Githttps://code.google.com/p/tortoisegit/

Git Colahttp://git-cola.github.io/downloads.html

Egithttp://www.eclipse.org/egit/

Quem usa?

https://github.com/google https://github.com/facebook http://aspnetwebstack.codeplex.com/

https://github.com/twitter https://github.com/linkedin https://github.com/netflix

KIDÁ(Obrigado!)

Contatos:

http://br.linkedin.com/in/rodrigobraga

[email protected]

https://twitter.com/Master_Roots

http://www.youtube.com/user/barbachannelParceiros: