How does one see the git command line executed by the MacOSX Git GUI Tower?

2.2k views Asked by At

Similar to "Is there a way to see the shell commands executed by SmartGit?" is there a way to see the commands that the Tower GUI is executing on my behalf? I want to learn the git command line at the same time I'm using the GUI.

2

There are 2 answers

1
Bouke On BEST ANSWER

This is possible if you enable Debug Logging in the Help menu. Then open Console.app and create a System Log Query like in the screenshot below. That will list all the commands that Tower.app executes for you. Note that it passes a lot of arguments that you normally wouldn't use yourself, so Tony's advice to learn the commands still applies.

System Log Query Example Tower log

0
Turbo Henry On

I managed to log the git commands by configuring my own git binary in Settings > Git config > Git binary Its a simple shell script that runs the original git and logs the arguments to a log file (that you need to adjust)

#!/bin/bash

git "${@}"
echo "$(date +%s) git ${@}" >> /some/path/my.log