Last active
November 9, 2024 22:03
-
-
Save tiagobbraga/84d2f5a43774e0297b4506aa1496e515 to your computer and use it in GitHub Desktop.
git-commands
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
Git clone com específico branch: | |
$ git clone --branch <branchname> <remote-repo-url> | |
Remover um arquivo específico | |
$ git rm --cached <filename> | |
Remover todos os arquivos gitignore | |
$ git rm -r --cached . | |
$ git add . | |
$ git commit -m "MESSAGE" | |
Novo branch com untracked files | |
$ git add -A | |
$ git stash | |
$ git checkout <branch> | |
$ git stash pop | |
Trocar url remote | |
$ git remote set-url origin <new_url_remote> | |
Criar tag | |
$ git tag -a v1.0 -m "MESSAGE" | |
Deletar tag local | |
$ git tag -d <tag_name> | |
Deletar tag remota | |
$ git push --delete origin <tag_name> | |
Compartilhar tag | |
$ git push origin v1.0 | |
Remover todos os commits | |
$ git checkout --orphan latest_branch | |
$ git add -A | |
$ git commit -am "mensagem" | |
$ git branch -D main | |
$ git branch -m main | |
$ git push -f origin main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment