简体   繁体   中英

“git svn rebase” without changing the current branch

I wrote a (bash) script located on my master branch and in the middle of it, I execute the following instructions:

(...)
git checkout featurebranch
git svn rebase
git checkout master
(...)

This script does not exist in the "featurebranch" so my script is aborted at the next instruction :) (you know, the man who saw the branc on which he sits :))

I don't really know how to resolve this problem since "git svn rebase" does not accept a target branch for the rebase operation, and I'm forced to checkout...

编写将主脚本复制到/ tmp并从那里执行的驱动程序脚本?

You can use a separate working directory to do those 3 operations. Take a look at the answers related to GIT_WORK_TREE and "--work-tree" provided in similar questions here

Or just copy the script to your home directory and run it from there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM