What exactly "Commit merged changes immediately" does?


I'am new to SourceTree/Git. Can anyone explain what exactly "Commit merged changes immediately" while pulling does? What is the difference between checking and unchecking this option?

Cheers Philip

1 answer

1 accepted

Hi Philip,

You have to do a commit when a merge is completed, because some of your local files might also be updated. By enabling the Commit merged changes immediately you give sourcetree the permission to do this commit directly/automatically if there were no merge conflicts.

Hope this answers your question?!

If this option was enabled and the merge fails with merge conflicts, no automatic commit will take place (and you have to do it manually after the merge conflicts have been fixed).

What is the difference with `git fetch` if I leave the checkbox unchecked.

git pull equal to git fetch and then merge, right ?

"git fetch" only updates the background copies of the remote branches. None of your local branches are updated.

If you pull or merge from a tracked remote branch WITHOUT committing immediately, then it will place the merge result into your working copy as "uncommitted changes".

Got it. Thanks a lot.

> because some of your local files might also be updated

I feel like I'm missing something here, isn't that the whole point of a pull, to update your local files? And why can't you update your local files by making a new commit?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Keough
Published yesterday in Training & Certification

The Project Administration in Jira Server Certification is here!

The Atlassian Certification you've been waiting for is here for good. We're thrilled to announce the official launch of our new Certification for Project Administration in Jira Server! The offering ...

76 views 0 8
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