Comandos e tutoriais importantes do Git

Como obter ajuda para um comando Git

ajuda [-a|–all|-i|–info|-m|–man|-w|–web] [COMMAND]

Exemplo: git help git

Ele inicia um navegador e mostra uma ajuda em HTML.

Configurando o repositório local e fazendo o push inicial:

cd my_project
git init
git add *
git commit -m "My initial commit message"
git remote add origin git@example.com:my_project.git
git push -u origin master

Repositório de check-out

git clone git://github.com/schacon/grit.git

Para confirmar as alterações no repositório local, basta adicionar, em vez de confirmar. Se você quiser enviar a ramificação/alterações locais para o repositório remoto, basta fazer o comando push abaixo.

git add --all

git commit --all

git push

Comando push para repositório

git push <remote> <local branch name>:<remote branch to push into>
git push [--all | --mirror | --tags] [--follow-tags] [-n | --dry-run] [--receive-pack=]
           [--repo=] [-f | --force] [--prune] [-v | --verbose] [-u | --set-upstream]
           [--force-with-lease[=[:]]]
           [--no-verify] [ […]]

Outros comandos para encontrar nos links a seguir.

Git diário com 20 comandos

https://www.kernel.org/pub/software/scm/git/docs/everyday.html

Bons tutoriais de Git

Tutorial 1 primeiro a fazer – http://git-scm.com/docs/gittutorial

Tutorial 2 segundos para fazer – http://git-scm.com/docs/gittutorial-2.html

Tutorial adicional – http://www.vogella.com/tutorials/Git/article.html#firstgit_repostatus

2 responses to “Comandos e tutoriais importantes do Git”

  1. I wanted to thank you for this wonderful read!!
    I definitely loved every bit of it. I have got
    you book-marked to check out new stuff you post…

  2. Wow, this paragraph iѕ pleasant, my younger
    sisster iss analyzing these kinds oof things,
    thus I am going to inform her.

Deixe uma resposta

Descubra mais no blogue de Velislav Krastev

Inscreva-se agora para continuar a ler e ter acesso ao ficheiro completo.

Continuar lendo