GitHub Desktop 3.2 adds pull request preview – but is a GUI needed for Git?

GitHub Desktop 3.2 adds pull request preview – but is a GUI needed for Git?

GitHub Desktop 3.2 was released last week, including a new “preview your pull request” feature that shows all the changes which the local branch would introduce into the default branch if merged. Pull requests are the standard way for contributors to propose changes to a repository’s source code.

The purpose of the feature is to give reassurance that unintended changes are not proposed, which can be “annoying, time consuming, and maybe even a little embarrassing,” according to senior software engineer Rebecca Hovemeyer. The way this is worded is a clue that GitHub has less experienced developers in mind (though anyone can make a mistake), which is in tune with the stated purpose of GitHub Desktop, including “reducing the intimidation of working with Git on the command line”.

GitHub Desktop, now at version 3.2, browsing its own repository

Other GitHub Desktop features which are new since version 3.0 released in April 2022 include force push to overwrite commits on the remote repository, pull request notifications on forks, and viewing changes across multiple commits.

The full features of Git are available through the command line and it is important that this is the case. Command line interfaces are more amenable to automation, and Git is frequently used on machines that lack any GUI. The “new feature” of GitHub Desktop is easily accomplished via the git diff command.

A GUI application is more approachable though, and has advantages for visualizing changes and navigating between features. “You can commit line by line within Github Desktop and it’s a much nicer experience IMO than doing so via CLI. It’s much easier to jump around to different files and commit related line changes in a bigger PR than jumping in and out of the patch command,” commented a developer on Hacker News. Another remarked though, “I haven’t found a need to use graphical git user interface. I work daily with repositories with millions of lines of code and git cli is good enough.”

There is another advantage for GitHub, which is that the desktop application is specific to GitHub, whereas command-line Git works with many different providers, including privately hosted repositories and GitHub rival GitLab – though with a little effort GitHub Desktop can work with non-GitHub repositories. Many developers though use Git via an IDE such as Visual Studio Code or JetBrains IntelliJ IDEA. Using an IDE brings the benefits of a GUI but without requiring GitHub, though the extent of Git features exposed in the IDE varies. There is also git-gui, a simple GUI client that is distributed with Git though it is an independent project.

GitHub Desktop is open source, written in TypeScript, and uses React. Despite its cross-platform approach, Linux is not officially supported though there are community releases.