2

我在 Eclipse 中使用带有 Egit 的 rebase 工作流。我在本地分支机构工作,就这个问题而言,将其称为“工作”。当我准备好整合我的更改时,我必须:

  1. 切换到master
  2. 拉动(快进)
  3. 切换到working
  4. 变基master,解决任何冲突
  5. 切换到master
  6. 合并working
  7. 推。

如您所见,有很多分支切换正在进行。这不是一个很大的时间消耗,因为切换分支非常快。然而,时间加起来,这是教新人做的额外步骤。我真正想做的是,同时working

  1. 拉取(导致master被更新)
  2. 变基master
  3. 切换到master
  4. 合并working

在这个工作流程中,我也不必为了引入更改并继续工作而完全不必要地切换分支。只需拉动,变基,继续。

master即使您在另一个分支上,如何将 git 配置为始终在拉取时更新?我更喜欢使用 Egit 的答案,但命令行解决方案也是可以接受的——它们也许可以用 Egit 执行。

4

1 回答 1

2

You could rather:

  • fetch (no need to change your current branch working)
  • rebase origin/master working
  • switch to master and merge working (fast-forward)

The last step would update master with both origin/master and working.

于 2013-03-27T14:45:29.390 回答