Powers of stash and rebase fall into the hands of noobs with GitHub Desktop 2.0

Still no official Linux version?

GitHub Desktop 2.0 is here and brings with it new features including stashing and rebasing.

Many GitHub users do not need Desktop, an application for Windows and Mac. It is one of several ways to interact with GitHub, and less capable than using the command line. Another option is to use the tools built into IDEs like Visual Studio, Visual Studio Code and Eclipse.

Why, then, does Desktop exist? The main reason is to make it easier to get started, without having to learn git commands. "We hope to continue to lower the barriers to entry so that millions more can participate in software development, research, design, and more," said the announcement.

You can also use GitHub Desktop as the centre of your GitHub workflow, cloning repositories, creating and switching between branches, synching with remote repositories, editing code in your favourite editor, and creating pull requests which let others review your code.

Version 2.0 follows on from the release of 1.6 in January, though whether it really merits a full version number upgrade is open to debate. The two big new features are stashing and rebasing.

Stashing is a way of saving your changes without committing them. The classic use case is when you are working on one branch, for a future release, when a bug report comes in and you need to switch to the current branch to fix it. Stashing lets you put your work aside without committing it, switch to the other branch to fix the bug, then switch back and reapply the stash.

Stashing in GitHub Desktop 2.0

Stashing in GitHub Desktop 2.0 (click to enlarge)

Rebasing is a way of integrating the changes from one branch into another by rewriting project history so that it looks as if all the commits where made on one branch. This makes for a cleaner project history, but it is also a dangerous option. "Do not rebase commits that exist outside your repository and people may have based work on them. If you follow that guideline, you'll be fine. If you don't, people will hate you, and you'll be scorned by friends and family," says the git manual.

GitHub Desktop 2.0 is therefore more powerful but also a riskier tool for developers not fully versed in the ways of git.

One curious thing is that although GitHub 2.0 is built with the cross-platform Electron framework, it is only officially available for Windows and Mac. Of course there is a fork, but why?

It is not because Linux users scorn GUI tools. "Our team has a strong background in Windows and macOS development, so those installers have been stable and fine for a while. We also have the ability to adapt the application to the platform it's running on, using the __LINUX__ global symbol in code. But the Linux ecosystem is the unknown for us, and my fork is a way to experiment and get something working with those who have the ability to provide feedback," said GitHub's Brendan Forster.

This has caused some puzzlement. "That an entity called 'GitHub' can't manage an official Linux app is just darn surprising," said one user.

Grab GitHub Desktop 2.0 here. ®

Biting the hand that feeds IT © 1998–2019