git rebase and git push: non-fast forward, why use?

前端 未结 2 511
深忆病人
深忆病人 2020-11-27 10:18

I have a branch that should be available to other contributors and that should constantly stay up to date with the master.

Unfortunately, every time I do \'git rebas

2条回答
  •  暖寄归人
    2020-11-27 11:11

    No, rebase is perfectly legal with public repositories and may even be desirable to keep the history fluent. Just keep in mind that you must not use rebase to rewrite the history of remotely published commits. That is, rebase can only be applied to your own, local, commits that you have never published. You use rebase to place your commits on top of them when fetch and then, perhaps, adjust them there. Another reason that you may receive such message is that the branch you pushing was updated and you need to synchronize -- fetch and rebase your commits on top of what you have fetched.

提交回复
热议问题