]> gitweb.fluxo.info Git - rhatto/dotfiles/git.git/commitdiff
Merge-to alias: support for branches with slashes
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 19 Jan 2016 14:36:22 +0000 (12:36 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 19 Jan 2016 14:36:22 +0000 (12:36 -0200)
gitconfig.dot.link

index 14b48b6018116edcede2ec951fc02151f4380ff3..7703c51cda716b21c2ff5af946b2a2caa694f500 100644 (file)
@@ -16,4 +16,4 @@
 [alias]
   # Thanks https://stackoverflow.com/questions/3672073/git-merge-to-another-branch
   #merge-to = "!f() { git checkout $1 && git merge $2 && git checkout -; }; f"
-  merge-to = "!f() { export tmp_branch=`git branch | grep '* ' | tr -d '* '`; git checkout $1 && git merge $tmp_branch && git checkout $tmp_branch; unset $tmp_branch; }; f"
+  merge-to = "!f() { export tmp_branch=`git branch | grep '* ' | tr -d '* ' | tr -d '/'`; git checkout $1 && git merge $tmp_branch && git checkout $tmp_branch; unset $tmp_branch; }; f"