From: Silvio Rhatto Date: Tue, 19 Jan 2016 14:38:54 +0000 (-0200) Subject: Merge-to alias: rollback and fix the real issue X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=dec428de802cea0945773dc95163e8f81ab441e2;p=rhatto%2Fdotfiles%2Fgit.git Merge-to alias: rollback and fix the real issue --- diff --git a/gitconfig.dot.link b/gitconfig.dot.link index 7703c51..5fcc5d7 100644 --- a/gitconfig.dot.link +++ b/gitconfig.dot.link @@ -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 '* ' | 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 '* '`; git checkout $1 && git merge $tmp_branch && git checkout $tmp_branch; unset tmp_branch; }; f"