Git fetch and git merge

After setting up an origin remote for your repository, you can pull the information in it down to your local computer.

You can either do it in one step with git pull, or two with git fetch and then git merge.

  • This will automatically look up the “origin” remote and fetch then information it contains. Once this has run, you are aware of the differences or changes compared to before, but nothing is yet committed: files in the folder are still just as they were before running the fetch command.

git fetch

The following is what creates a commit to change the information in the folders:

git merge