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

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

+1 for a console log of command history.

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.

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.

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.

It seems that it has been changed in between.

Consider my Reply at above Post...

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.

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.

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

I am using version 1.2.9.1

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/

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

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

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?

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?

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

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.

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

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
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...

560 views 1 2
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