Created
January 5, 2023 17:23
-
-
Save otaviolarrosa/c9b5cc4bc69afae1b0379ba5622781eb 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
alias difftool='git difftool' | |
alias mergetool='git mergetool' | |
alias cob='git checkout -b' | |
alias p='git pull' | |
alias co='git checkout' | |
alias st='git status -s' | |
alias cmm='git commit -m' | |
alias a='git add .' | |
alias cpe='git cherry-pick -e' | |
alias cpn='git cherry-pick -n' | |
alias master='git checkout master' | |
alias diff='git diff' | |
alias develop='git checkout develop' | |
alias master='git checkout master' | |
alias b='git branch' | |
alias ~='cd ~' | |
function cmmpush(){ | |
git add . | |
git commit -a -m "$1" | |
while :; do | |
git push origin `git rev-parse --abbrev-ref HEAD` | |
status=$? | |
echo $status | |
if [ $status -eq 0 ] | |
then | |
echo "Atualizado, saindo" | |
break | |
fi | |
done | |
} | |
function rb() { | |
echo "Listando branchs remotas: " | |
git branch -r | |
} | |
cmmpushnojson() { | |
git add *.cs *.csproj *.sln | |
git commit -a -m "$1" | |
while :; do | |
git push origin `git rev-parse --abbrev-ref HEAD` | |
status=$? | |
echo $status | |
if [ $status -eq 0 ] | |
then | |
echo "Atualizado, saindo" | |
break | |
fi | |
done | |
} | |
function cmmpushforce(){ | |
git add . | |
git commit -a -m "$1" | |
while :; do | |
git push origin `git rev-parse --abbrev-ref HEAD` -f | |
status=$? | |
echo $status | |
if [ $status -eq 0 ] | |
then | |
echo "Atualizado, saindo" | |
break | |
fi | |
done | |
} | |
function pr(){ | |
git pull origin `git rev-parse --abbrev-ref HEAD` | |
} | |
function po(){ | |
git push origin `git rev-parse --abbrev-ref HEAD` | |
} | |
function pof(){ | |
git push origin `git rev-parse --abbrev-ref HEAD` -f | |
} | |
function cmm(){ | |
git add . | |
git commit -a -m "$1" | |
} | |
function log(){ | |
git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
} | |
function loggraphh(){ | |
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
} | |
function deletebranch(){ | |
git branch -D "$1" | |
} | |
function rebase(){ | |
git rebase "$1" | |
} | |
function stash(){ | |
git stash push -m "$1" | |
} | |
function stashlist(){ | |
git stash list | |
} | |
function stashpop() { | |
git stash pop stash@{"$1"} | |
} | |
function pushForever() { | |
while :; do | |
git push origin `git rev-parse --abbrev-ref HEAD` | |
status=$? | |
echo $status | |
if [ $status -eq 0 ] | |
then | |
echo "Atualizado, saindo" | |
break | |
fi | |
done | |
} | |
function pushForeverForce() { | |
while :; do | |
git push origin `git rev-parse --abbrev-ref HEAD` -f | |
status=$? | |
echo $status | |
if [ $status -eq 0 ] | |
then | |
echo "Atualizado, saindo" | |
break | |
fi | |
done | |
} | |
function pullForever() { | |
while :; do | |
git pull origin `git rev-parse --abbrev-ref HEAD` | |
status=$? | |
echo $status | |
if [ $status -eq 0 ] | |
then | |
echo "Atualizado, saindo" | |
break | |
fi | |
done | |
} | |
function cloneForever() { | |
baselink="https://xpinvestimentos.visualstudio.com/Projetos/_git/" | |
project="$1" | |
completelink=$baselink$project | |
echo $completelink | |
while :; do | |
git clone $completelink | |
status=$? | |
echo $status | |
if [ $status -eq 0 ] | |
then | |
echo "Atualizado, saindo" | |
break | |
fi | |
done | |
} | |
function fetchAllForever() { | |
while :; do | |
git fetch --all | |
status=$? | |
echo $status | |
if [ $status -eq 0 ] | |
then | |
echo "Atualizado, saindo" | |
break | |
fi | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment