DEV Community

Discussion on: Learn git concepts, not commands

Collapse
parkerholladay profile image
Parker Holladay

I do not understand local repo.

When working with a clone of some remote repository, what you have is a git repository on your local machine that is a copy of the remote at that point in time. All work you do is in your local repository, which, to your point, you should constantly keep in sync with the remote repository.

Also, I agree 100% with not wanting long-lived branches, but rebase and merge (and their differences) are very important concepts to understand in git. You can't

keep everything in the remote repo and push/pull frequently

without doing a merge or rebase at some point, whether implicitly or explicitly. Every pull from remote causes a merge of some sort. All commits, including pull requests (when accepted), have to be merged into your trunk somehow--whether with a merge commit, or by being rebased then merged. The author does a great job of illustrating the distinctions and benefits of both.