Is there a way to view the git command that is run when using the SourceTree GUI?

Moiz Raja
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 24, 2012

I want to be able to tell what git command was executed for example when I use the Resove Conflicts/Resolve using 'Mine' and Resolve using 'Theirs' option.

7 answers

1 accepted

11 votes
Answer accepted
swrobel
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!
November 27, 2013

+1 for a console log of command history.

Michael Schmid August 30, 2017

The Last command can be dispayed when checking:
(SourceTree|Win|2.1.11.0)  Tools>Options>Repo Settings>Always display full console output

'View>Show Command output' I haven't found

See the complete History like using the console would be pretty. Maybe with direct possibility to take over to cmd-usage.

8 votes
Nicholas Gard
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!
July 2, 2014

For the next person who happens upon this post, you can now (in version 1.9.4.1) view a log of all git commands via View > Show Command Output.

clozach
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!
February 19, 2017

Mac: ⇧⌘W

James Osborne November 21, 2017

For me, when I click "View", I see only the following:

Refresh

Next Tab

Previous Tab

File Status View

Log View

Search View

I would love to find out how to show command output.

Like Deleted user likes this
Michael Schmid November 22, 2017

It seems that it has been changed in between.

Consider my Reply at above Post...

James Osborne November 22, 2017

Yes - your post was helpful.  I was hoping there was a feature to configure and view a log of the history of commands, though.  But this will be helpful going forward.

3 votes
stevestreeting
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 Leaders.
January 24, 2012

For many commands you can set the 'Always Show Full Output' option in Preferences, which will always show the output window with the command and console output. However minor commands like add/remove and resolve don't use a full task window like this.

FYI the command for both commands is:

git cat-file blob [sha]:[filename] > [filename]
git add [filename]

Where 'sha' is the commit from the merged branch for 'Resolve Using Theirs', and HEAD for 'Resolve Using Mine'. This is done so that the clean copy from one or other side of the merge is used to resolve the conflict - if you want something else you should either edit the file manually or use the visual merge route.

Prakash Nadar January 24, 2012

I could not find the "Always Show Full Output" option in the preference window.

I am using version 1.2.9.1

stevestreeting
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 Leaders.
January 24, 2012

Oops, sorry this option was added in 1.3. It's due out next week, or you can grab the beta here: http://www.sourcetreeapp.com/2011/12/29/sourcetree-1-3-beta-3-released/

David Rees
Contributor
January 11, 2013

Rather than a dialog I have to close each time, I would just like a IDE-like console window (or even external log file I can check). Often I realize a few commands later I would like some key piece of the output (SHAs, conflict info, etc).

Is there something like that hidden somewhere? Thanks, d

stevestreeting
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 Leaders.
January 11, 2013

Not yet, although a more persistent 'console log' is something we might add in future.

2 votes
David_Marley
Contributor
July 28, 2014

Version 1.9.4.1 refers to the Mac version of SourceTree, correct? I am at the latest version of SourceTree for Windows (1.5.2) and I don't have a "Show Command Output" option under the View menu. Is this feature going to be added to the Windows version?

0 votes
Robert Glover December 14, 2014

Using Bootcamp, I compared SourceTree in Win7 to SourceTree in MAC (Yosemite).  On the MAC, the latest version (as of Dec 14, 2014) is SourceTree 2.0.3.  Unlike the Windows version, the MAC version (as shown in the attached image) will display the command history at the bottom of the SourceTree window if "View....Show command output" is checked.  Note that It does not show git commands manually typed into the SourceTree git terminal, it only shows commands generated by the SourceTree GUI itself.  Incidentally, the MAC version of SourceTree uses an embedded GIT (version 1.8.4.2) but has an option to use System Git.  I took that option so that the terminal window and the GUI both use System Git version 1.9.3 (from /usr/bin/git).

0 votes
Robert Glover December 11, 2014

Works for me in Windows 7 using version 1.6.11.0. For example, when I click "Push", at the conclusion a modal window appears (with an "OK" button) that shows a checkbox with "Show Full Output" checked. Beneath the checkbox it shows the git command issued. For example in this case it shows: 

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin gh-pages:gh-pages master:master
David_Marley
Contributor
December 11, 2014

Yes I've been using the "Show Full Output" option for a long time, but that's just the _last_ command issued. What I'd like to see is a full running log of _all_ commands issued in a given session, similar to what you'd get working with Git from the command-line, so that if a problem of some sort arises, I can go back and review previous sequence of commands to troubleshoot. According to Nicholas Gard's comment on Jul 03, 2014, the Mac version of SourceTree includes this capability but the latest version for Windows (1.6.11.0 I believe) still does not. Given that it's in the Mac version, it'd be nice to see it ported over to the Windows version.

Like Niels Kristian Jensen likes this
0 votes
digory
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!
October 30, 2014

I'm using the latest Windows version, 1.6.8.0. When I select 'Always display full console output' in the Options, nothing happens. The View menu does not contain an item called 'Show Command Output'. Is this planned to be implemented soon?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events