Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to find out which file SourceTree takes exactly as Base, Local, Remote and Backup ?

A. Cemal Özlük June 5, 2018

When merging operation is called, temporary files are created in the project folder that was checked out such as BASE, LOCAL, REMOTE and BACKUP.

 

How to find out which commits SourceTree takes exactly for Base, Local, Remote and Backup ?

1 answer

1 accepted

0 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2018

Hi Ali,

And welcome to the Atlassian Community.

BASE is the common ancestor before there where any changes to the file on either side.
LOCAL is your side of the conflict, e.i. your changes made to the file.
REMOTE is "theirs" side of the conflict, e.i. changes made on the branch you are merging from.
BACKUP is what the file looked like before you invoked the merge tool.

You can find out the base commit by using git merge-base and feed it with the commit on your branch and the commit on the branch you are merging to.

A. Cemal Özlük June 12, 2018

Hello Mikael,

 

thank you for your reply, it helped much indeed. Do you know how to find out which base git is taking in a specific merge session when git merge ....... command is called?

Thanks.

Regards, Cemal.

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 12, 2018

Cemal, the git merge-base command I linked to above should be able to tell you what the base commit is. It will figure out the common ancestor.

A. Cemal Özlük June 12, 2018

Mikael, thank you. The command does really return a commit, however, when I merge I get a 1KB base file which is practically empty and the returned commit is not empty, it is a file over 100 MB big. I have this related question. So I was wondering, if there is a way to get the base commit in a current merge operation beyond the one returned by the command or why does merge retrieve an empty base, although the returned base by the command is a "big" file ?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 13, 2018

I believe it depends on what diff/merge tool you are using and how it is using the BASE file. I have seen some tools that only stores a reference to the common ancestor, looks like that is the case here.

A. Cemal Özlük June 13, 2018

The point is it is not always the case that in the merge process a 1KB BASE file is created. For merge with some other branches it works fine as usual. I have this issue since a short time (Monday). Further, I tried to merge using git merge <sourcebranch> command and git mergetool command to merge and resolve conflicts, all without Sourcetree involved. Still the same problem. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events