3 ms·
As a git newbie I just do git pull. Is the problem that the merge makes the commit history harder to reason through in the future vs if you rebase?
by rendang 3y ago
As a git newbie I just do git pull. Is the problem that the merge makes the commit history harder to reason through in the future vs if you rebase?
- kjkjadksj 3y agoIf you aren’t working with multiple people or making a mess of your repo then git pull is fine.
- tayo42 3y agoIts probably more complex then I'm ready to explain in a comment section. But its useful when you are working on your own branch (IDK why you wouldn't be?) and need to integrate recent merges from the master branch on to your own branch.
- rayiner 3y agoYes. Say you git clone a repository, and over the course of some months add a new feature. If you do a rebase then push, then it will appear in the history as if you had done a clone of the most recent version of the repository, done all your commits, and then pushed your changes to the main repository. Otherwise, the history will have merge commits in it where your commits to your local repository are merged with commits that were pushed to the public repository after you cloned your local repository.