Referências de GIT
referência: http://git-scm.com/book/pt-br/Git-Essencial-Tagging
git init
git config --global user.name "" git config --global user.email "" git config list
git clone git://github.com/repositorio
git remote -v git remote add [apelido] [url-remote]
Deletar branch remote: git push origin --delete $branchname
git checkout [nome-branch] git branch [nome-branch]
git merge --no-ff [nome-branch] opção --no-ff força a criação de um commit, facilitando o reverse.
http://blog.gustavohenrique.net/2011/03/comandos-basicos-do-git/
git reset --hard HEAD~1 (volta ao último commit)
Para recuperar um commit do reset – HARD basta usar git reflog
git reset --soft HEAD~1 (volta ao último commit e mantém os últimos arquivos no Stage) git reset --hard XXXXXXXXXXX (Volta para o commit com a hash XXXXXXXXXXX)
git revert HEAD~3
==============================================================================================
Baixar branch remoto no local
sudo git remote update
sudo git checkout sprint-4
sudo git pull -u origin sprint-4
http://blog.gustavohenrique.net/2011/03/comandos-basicos-do-git/
====================================================
git clone url
git add name-file
git commit -m "mensagem do commit"
git pull origin master
git push origin master
git branch novo-branch
git log
git log --stat (exibe o log e arquivos que foram commitados)
git config core.fileMode false
================================================= Trabalhando com Tag - ref: https://git-scm.com/book/pt-br/v1/Git-Essencial-Tagging
Tags Anotadas Criando uma tag anotada em Git é simples. O jeito mais fácil é especificar -a quando você executar o comando tag:
Compartilhando Tags git push origin [nome-tag] ou git push origin --tags
Criando branch a partir de uma tag
git branch newbranch v1.0
git checkout -b newbranch v1.0
git tag -d 12345 git push origin :refs/tags/12345
=============== referencia: http://pt.stackoverflow.com/questions/19393/como-voltar-o-projeto-a-um-commit-espec%C3%ADfico#_=_ https://git-scm.com/book/pt-br/v1/Ferramentas-do-Git-Fazendo-Stash
git rm -r --cached
Untrack files already added to git repository based on .gitignore Step 1: Commit all your changes. Before proceeding, make sure all your changes are committed, including your .gitignore file. Step 2: Remove everything from the repository. To clear your repo, use: git rm -r --cached . ... Step 3: Re add everything. git add . Step 4: Commit. git commit -m ".gitignore fix"
reference: https://dev.to/ben/git-standup-how-did-i-ever-live-without-you
git rm -r --cached .