aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-10-17 13:07:08 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-10-17 13:07:08 -0300
commite157ca4ed79288c41aa6765347558ba1b292a371 (patch)
treed4b25fbcfabd0dd89d0866d449225c477d1c9a4a
parent5203ba419c98626ed6bac1ca8db6e43c626fdf83 (diff)
downloadgit-e157ca4ed79288c41aa6765347558ba1b292a371.tar.gz
git-e157ca4ed79288c41aa6765347558ba1b292a371.tar.bz2
Adds merge-to alias
-rw-r--r--gitconfig.dot.link5
1 files changed, 5 insertions, 0 deletions
diff --git a/gitconfig.dot.link b/gitconfig.dot.link
index 2c332de..14b48b6 100644
--- a/gitconfig.dot.link
+++ b/gitconfig.dot.link
@@ -12,3 +12,8 @@
[hooks]
global = ~/apps/scripts/misc/git-hooks/contrib/ ~/.git_hooks
+
+[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"