Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Automatically prune remote branches when fetching

* Removes the need to occasionally run `git remote prune`.
* Remove branches when fetching instead of deleting other branches.

https://trello.com/c/ePlghTll/249-configure-git-to-prune-on-fetch
  • Loading branch information...
commit 6d0ea824f4a4001ab09a35ffffb51ebfcd0f54d5 1 parent a2fdd16
@jferris jferris authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 gitconfig
View
4 gitconfig
@@ -9,7 +9,7 @@
ci = commit -v
co = checkout
create-branch = !sh -c 'git push origin HEAD:refs/heads/$1 && git fetch origin && git branch --track $1 origin/$1 && cd . && git checkout $1' -
- delete-branch = !sh -c 'git push origin :refs/heads/$1 && git remote prune origin && git branch -D $1' -
+ delete-branch = !sh -c 'git push origin :refs/heads/$1 && git branch -D $1' -
merge-branch = !git checkout master && git merge @{-1}
pr = !hub pull-request
st = status
@@ -23,3 +23,5 @@
path = .gitconfig.local
[commit]
template = ~/.gitmessage
+[fetch]
+ prune = true
Please sign in to comment.
Something went wrong with that request. Please try again.