How to git pull to download and merge new changes from remote branch into your local branch via command line – 125

And now for the exciting conclusion*

As shown in Tip 118 – how to download and merge commits using Pull in Visual Studio, today’s tip rinse and repeats from the command line.

Unlike this past week, you are ready to fetch changes and merge them all in one command: Pull.

First, checkout the desired branch.

Second, run the following

$ git pull

And git will perform the fetch and merge all at the same time.

git pull shown fetching and merging in a newfile-for-pull-demo.md

*I think my greatest obstacle in learning git commands is knowing when  a command or subcommand wants 1. a remote 2. a branch name 3. nothing at all.

Has anyone tried nursery rhymes yet to learn git commands in the same way we learn the names of the planets?  I really need to get back into standup comedy.

Leave a comment