aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitconfig2
1 files changed, 1 insertions, 1 deletions
diff --git a/.gitconfig b/.gitconfig
index b14b609..a586fd0 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -14,7 +14,7 @@
# Commit all changes
ca = !git add -A && git commit -av
# Switch to a branch, creating it if necessary
- go = checkout -B
+ go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a