Is there a way in the latest github git gui for mac (desktop.github.com) to set the git diff parameters? For example I would like the git-gui to ignore-whitespace-change in diff
git diff --ignore-space-change
Compare Files (1), with TFS and Git GUI in Visual StudioIn Source Control Explorer, right-click a file and select Compare. The Compare dialog box is opened, At this point, we can choose any different two files, two folders, two versions of branches into the Source Path and the Target Path for the comparison.
You can use GitHub Desktop to complete most Git commands from your desktop with visual confirmation of changes. You can push to, pull from, and clone remote repositories with GitHub Desktop, and use collaborative tools such as attributing commits and creating pull requests.
Comparing branches is as easy as selecting the “compare to branch” option while perusing the feature branch you'd like to compare to another. The compare to branch option in GitHub Desktop is located under the “Branch” in the main menu at the top of the interface.
git-gui
is not the same as the GitHub Desktop. git-gui
comes with the Git installation (you can download the latest for OSX from git-scm.com/download/mac; the current version is 2.9.2 as of this answer date). Once installed, you can run git-gui
from the command line (it installs at /usr/local/opt/git/libexec/git-core/git-gui
). You can then access Preferences in Git Gui menu, and put -w
(or --ignore-all-space
) in Additional Diff Parameters field to ignore whitespace change, or add any other git-diff parameter.
GitHub Desktop, on the other hand, does not have such option available.
Update Apr. 2021, 5 years later, GitHub Desktop can actually hide whitespace (GitHub Desktop 2.8):
Hide whitespace in diffs
Similar to being able to see more context around your changes, sometimes there are a lot of whitespace changes in a file that don’t allow you to get a clear picture of the substantive changes that happened.
Now, in both changes and history, you can optionally hide whitespace changes to allow you to focus just on the more meaningful changes to your code.
This feature was built almost entirely by Steven Yeh (@say25), a fantastic and close community contributor to GitHub Desktop. Steven is a long-time open source contributor to GitHub Desktop, and we’re immensely grateful for him continuing to help improve the product.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With