preface

Whether to use Git or SVN for personal development depends on your personal preferences or tool habits.

Once you move into a collaborative work environment, git’s strong support for branching has made it the dominant version control tool of choice for team development over the years.

However, the same git, different people use out of the effect, or a thousand different.

Which of the following two branching graphs do you prefer?

Be gay

Git rebase Master is a magical Git operation that allows you to reevolve your current development branch based on the latest master branch.

Rebase before

After the rebase

Retain merge history with base change

What happens if the development branch is behind the latest master node and has a complex merge history?

Direct rebasing abandons the merge action and loses the merge details.

Git rebase master -p solves this problem, at least in most scenarios.

There was a lot of detail in the development branch before the transition

Keep merge details of the base change, cool.

After the language

This article focuses on introducing you to the magic of the Git rebase command, but there are a lot of details you need to pay attention to if you want to achieve effective teamwork, but that’s another story.

From the original star blog: wanyaxing.com/blog/201812…