SourceTree - How to Merge/Commit after Pull

Recently I did a Pull to get the latest from the remote. Immediately after that, my Working Copy changed to 23 from 7 (under File Status on the left panel). Presumably, the difference is the new files pulled from the remote that are newer than my local copies. The bottom status bar says: master Merge: 17 modified 6 missing. (I know that a dev deleted files which explains the 6 missing).

I want to update my local dev environment with the latest files, but am unclear how to do that and get my Working Copy back to the number that reflects only the files that I have changed locally.

git status from command line says “On branch master. All conflicts fixed but you are still merging.
Use “git commit” to conclude merge. In addition, there is a list of files (in red) that are “Changes not staged for commit. (I have not touched those files).
Use ‘git add/rm’ to update what will be committed.
Use ‘git checkout’ to discard changes in working directory.

Question: what is the fastest way to just update my local files and get “Working Copy” to 0?
Do I really need to do a “git commit” AND “git add” AND “git checkout”?


I’m just nervous about potentially changing anything on the remote or getting further out of synch.

Thanks in advance.

3 answers

This widget could not be displayed.

This sounds like an unusual situation to me. In my experience Git won't allow me to pull if I have any uncomitted changes in my repo. Are you confident you had local changes (that weren't committed)?

This widget could not be displayed.

Thanks Seth. If we assume that I did not have uncommitted changes in my repo, and all I need to do is commit all the changes I've pulled from remote repo, is it correct that I can hit the top "commit" button? Just confirming that that only impacts my local repo (because I don't want to change remote at this point). Cheers

This widget could not be displayed.

Correct. "Commit" is a local operation. You must "Push" to modify remotes.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

879 views 2 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you