Skip to content

Commit

Permalink
Fix git delete-merged-branches
Browse files Browse the repository at this point in the history
delete-merged-branches was failing due to ANSI colour codes being
output which git was trying to use as part of the branch names. This
commit disables the colour output for the merged command to fix this.
  • Loading branch information
bashton-ajenkins committed Jun 15, 2018
1 parent 1c22229 commit a816c0a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions git/gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
bM = branch -M
bs = show-branch
bS = show-branch -a
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"

# checkout/fetch/merge/push/rebase
# checkout
Expand Down Expand Up @@ -140,6 +141,16 @@
rex = remote rm
rem = remote rename

# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
# Delete the remote version of the current branch
unpublish = "!git push origin :$(git branch-name)"

# Delete any branches that have been merged into master
# See also: https://gist.github.com/robmiller/5133264
delete-merged-branches = "!git checkout master && git branch --no-color --merged | grep -v '\\*' | xargs -n 1 git branch -d"

[push]
default = matching

Expand Down

0 comments on commit a816c0a

Please sign in to comment.