Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.04 KB

README.md

File metadata and controls

56 lines (42 loc) · 1.04 KB

Aprendendo Git

Esse arquivo irá ter todos os comandos do curso de Git.

$ git config --global user.name "Nome"
$ git config --global user.email "[email protected]"
$ git init
$ git status

Comandos de log

$ git log
$ git log --full-diff -p <file>
$ git log --oneline --graph --all --decorate #faz um log dos branchs bonito

Checkout

$ git checkout -- <file> #Desfazer a mudança no arquivo <file>

Trabalhando com branchs

$ git checkout -b <name> #cria e faz checkout na nova branch
$ git checkout <name> #Alterna entre as branchs
$ git branch <name> #cria uma nova branch sem mudar

Trabalhando com tags

$ git tag #lista as tags
$ git tag -a <tag> -m <message> #adiciona uma nova tag
$ git tag -d <tag>  #apaga a tag
$ git show <tag> #mostra o log da tag

Primeiro Push

Comandos para fazer um primeiro push

$ git remote add origin <url>
$ git push -u origin master #somente na criação do repositório

Clonando o projeto

$ git clone <url>

teste