Last active
March 29, 2020 23:55
-
-
Save fernandopetry/7b9649f3b5fd6abdd53f to your computer and use it in GitHub Desktop.
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
%%%%%%%%%%%%%%%%%%%%% Branchs %%%%%%%%%%%%%%%%%%%%%% | |
# Criando um branch | |
git branch nome-branch | |
# Visualizando branchs criados | |
git branch | |
# Criar um branch e já acessar o mesmo | |
git checkout -b nome-branch | |
# Mudar de branch | |
git checkout nome-branch | |
# Combinando (mesclando branchs) | |
git merge nome-branch-que-deseja-juntar | |
# Verificando mudanças | |
git log --all --graph --oneline --decorate | |
# The command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples | |
git describe --abbrev=0 --tags # gets tag from current branch | |
git describe --tags `git rev-list --tags --max-count=1` # gets tags across all branches, not just the current branch | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment