this post was submitted on 22 Sep 2023
24 points (100.0% liked)
Git
2632 readers
2 users here now
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Resources
Rules
- Follow programming.dev rules
- Be excellent to each other, no hostility towards users for any reason
- No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
To expand on this a bit,
git pull
under the hood is basically a shortcut forgit fetch
(get the remote repository's state) andgit merge origin/main main
(merge to remote changes to your local branch, which for you is always main).When you have no local changes, this process just "makes a line" in your commit history (see
git log --graph --decorate
), but when you have local changes and the remote has changed too, it has to put those together into a merge commit - think a diamond shape with the common ancestor at the bottom, the remote changes on one side, your changes on the other side, and the merge of the two at the top.Like the above comment says, normally this process is clarified at the command line - VSCode must be handling it automatically if there are no code conflicts.