我正在为我的Git工作流写一些脚本。Git:重置其他分支到当前没有结帐
我需要将其他(现有)分支重置为当前分支,而无需结帐。
前:
CurrentBranch: commit A
OtherBranch: commit B
后:
等效的$ git checkout otherbranch
$ git reset --soft currentbranch
$ git checkout currentbranch
CurrentBranch: commit A
OtherBranch: commit A
(注--soft:我不想影响工作树。)
这可能吗?
有谁知道这是不是也有可能在例如:It? – zedoo 2018-01-24 17:26:51