Better git aliases.
This commit is contained in:
parent
92b8c8ad0b
commit
cae6099b95
1 changed files with 5 additions and 0 deletions
|
@ -4,10 +4,15 @@ alias ga='git add .; git commit --no-edit --amend; git push --force-with-lease'
|
||||||
alias gae='git add .; git commit --amend; git push --force-with-lease'
|
alias gae='git add .; git commit --amend; git push --force-with-lease'
|
||||||
gd() {
|
gd() {
|
||||||
curr_branch=$(git symbolic-ref --short -q HEAD)
|
curr_branch=$(git symbolic-ref --short -q HEAD)
|
||||||
|
if [ $curr_branch = "master" ]; then
|
||||||
|
echo "On master, aborting."
|
||||||
|
return
|
||||||
|
fi
|
||||||
git checkout master
|
git checkout master
|
||||||
git branch -D ${curr_branch}
|
git branch -D ${curr_branch}
|
||||||
git pull
|
git pull
|
||||||
}
|
}
|
||||||
|
alias gl="git log --graph --abbrev-commit --date=short --pretty=format:'%Cred%h%Creset %Cgreen%cr%Creset: %s : %C(bold blue)%an%Creset %C(yellow)%d%Creset'"
|
||||||
|
|
||||||
alias less='less -R'
|
alias less='less -R'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue