#Reset
Voltar como estava no remote
$ git reset --hard origin/master#Merge
Fazer merge de um arquivo específico
$ git checkout source_branch -- <paths>...Merge da branch local(master) com uma remote(other_branch) dando prioridade para remote
$ git merge --strategy recursive -X theirs $BRANCH#tags
Deletar tag local
$ git tag -d <TAG_NAME>Deletar tag do remote
$ git push --delete origin <TAG_NAME>$ git branch -D <branchName> && git push origin :<branchName>local
$ git branch -D <branchName>remote
$ git push origin :<branchName>Delete a list of branhes
delete_branch() {
for BRANCH in "$@"
do
echo "$BRANCH"
git branch -D $BRANCH && git push origin :$BRANCH
# play sound of the ubuntu os
paplay /usr/share/sounds/ubuntu/stereo/dialog-error.ogg
done
} git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --allEx: merge_theirs master
Ex: merge_theirs otherBranch
merge_theirs() {
BRANCH=$1
git merge --strategy recursive -X theirs $BRANCH
}