git 流特征的方向合并?

Orientation of git flow feature merges?

作者在this answer中谈到:

"You normally don't merge feature branches repeatedly into develop. You merge develop into the feature branches (i.e. the other way around) or rebase the feature branches onto the HEAD of develop (recommended)."

现在当我在没有 git flow 的情况下完成功能分支合并时,我总是只是切换我的 master 分支然后 运行 git merge <latest-feature-branch-commit> 然后那个在合并任何冲突并提交后将其合并回 master。因此,在 git flow 中假设 develop 分支在这种情况下充当 master 分支也是如此(或者至少我一直这么想,因为你分支了你的feature/*git flow 中分支出来),那个 post 的作者对 "you merge develop into feature branches" 的意思是什么?他的意思是你应该在 feature/n 分支然后从那里合并 develop 吗?除非我遗漏了什么,否则这听起来有点荒谬...

git rebase 与 git 合并相反。在 git rebase 中,我们从 master/develop 分支中获取更改并将它们添加到功能分支,而不创建任何提交历史记录。 git rebase 也进行合并,但方向相反(main->feature)。 这对您来说可能听起来很荒谬,但是使用 git 变基有几个优点 here