Last active
February 26, 2019 19:23
-
-
Save acaciomartins/7219fa0ff1057679a589e9b6ac66b7de to your computer and use it in GitHub Desktop.
Comandos GITs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URLs | |
=== | |
http://rogerdudler.github.io/git-guide/index.pt_BR.html | |
Manual | |
====== | |
rm -f ./.git/index.lock ==> para arquivo locado | |
git clone https://[email protected]/sciensa/auto2.0-front.git | |
git branch | |
git checkout desenv | |
git branch | |
git checkout -b desconto-correntista (cria a branch desconto-correntista) | |
git branch (mostra branch atual) | |
git status | |
git add . | |
git status | |
git add . | |
git commit -m "Desconto correntista checkbox" | |
git push --set-upstream origin desconto-correntista | |
git commit -m "Mudança server-path prd=dev" | |
git push | |
git pull | |
git commit --amend ==> edita o texto do commit. Após esse comando um editor é aberto e a mensagem pode ser alterada. | |
git clean -fd (limpa toda sujeira) | |
============================================================================ | |
git checkout -- <arquivo> (isto substitui as alterações na sua árvore de trabalho com o conteúdo mais recente no HEAD) atualiza por completo sua branch | |
-------- | |
MUDAR DE REPOSITORIO REMOTO | |
-------- | |
The ""git remote set-url"" command takes two arguments: | |
----- | |
Mostra os repositorios remotos | |
$ git remote -v | |
> origin [email protected]:USERNAME/REPOSITORY.git (fetch) | |
> origin [email protected]:USERNAME/REPOSITORY.git (push) | |
Switching remote URLs from SSH to HTTPS (Altera o repositorio para outro. | |
Ex.: alterar DE [email protected]:USERNAME/REPOSITORY.git PARA "https://github.com/USERNAME/REPOSITORY.git" | |
$ git remote set-url origin https://github.com/USERNAME/REPOSITORY.git | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment