Git - Fetch vs Pull

I never really cared about the Fetch and Pull commands.

I guess the pattern was:

  • Go into Jira and create a ticket off of the develop branch. (for example a branch named 6255-AddTopic)
  • Goto Visual Studio (or Visual Studio Code) and perform the Pull command (or the Fetch command - since they are next to each other)
  • Changed branch to origin/6255-AddTopic

But then there was a update to Visual Studio and when you are on the Develop branch, the Pull function is disabled.

Here’s what I feel, based on what my current work pattern is:

  • Fetch - pulls down meta data (server based new branching as well as the knowlege of knowing which branches have been changed)
  • Pull - Might do a fetch, but then pulls down changes of the branch you are working on.

In playing I find that the develop branch on my computer is getting more and more outdated. Then I start getting conflicts. Creating the branch on the server side is a bit safer.

But I also found using the merge function to merge the origin/develop branch to the local develop branch does bring the local develop branch up to date.