How to properly sync your git branch with others

This is a part of a conversation where Linus Torvalds explains in a very clear way how one should work locally on his branch, rebase only when the work or at least a major part of it is done, don’t pull from a branch with random commits in it, etc. All of this is to avoid huge number of small commits to enter the master branch’s history and at the same time to have a sane history coming from your own branch.

Re: [git pull] drm-next [].

Current Git branch name in command prompt |

Current Git branch name in command prompt |

You may want to add a new line at the end with:


The new line is just before the $ symbol at the end. I’ve got used to the git-bash Windows prompt and prefer it that way. It also saves some space for your long commands.