The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What exactly "Commit merged changes immediately" does?

Philip Steinebrunner
Contributor
May 20, 2014

Hi

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

6 votes
Answer accepted
Deleted user
May 20, 2014

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?!

Deleted user
May 20, 2014

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).

Davel Liu
August 22, 2014

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

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

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 24, 2014

"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".

Davel Liu
August 24, 2014

Got it. Thanks a lot.

wouter_visee
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 7, 2017

> 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?

Ashrith Racharla
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 10, 2019

You are right in saying the purpose of Pull is to update local files. However, checking the "Commit merged changes immediately" helps you to avoid a few clicks/commands by doing both Pull and Commit at one go.

 

The response might be too late for you, but still wanted to comment as it might help somebody else!

Like # people like this
TAGS
AUG Leaders

Atlassian Community Events