GitHub has released Git 2.35 with new features and bug fixes from over 93 contributors. Here’s a sneak peek into some of the interesting features and changes introduced in the new version.
GitHub has introduced a ‘git stash’ tool to store away any changes to files tracked in the Git repository. This is useful when developers are working on a complicated change and need to temporarily discard some parts of the work to deal with them separately. To also store part of your changes in the stash, there is ‘git stash -p’. The team has also introduced ‘git stash’‘s new ‘—staged’ mode that makes it easy to stash away from the staging area and ‘git stash pop’ for recovering changes.
Sign up for your weekly dose of what's up in emerging technology.
The ‘git log’ now has a rich set of ‘—format’ options to customise the output of ‘git log’.
In 2.35, Git has included a couple of new ways to tweak the output of ‘git describe’. Developers can control whether to use lightweight tags, and the number of hexadecimal characters to use when abbreviating an object identifier.
Git 2.35 allows developers to take advantage of OpenSSH’s ‘valid-before’ and ‘valid-after’ directives and ensures the object verifying was signed using a signature that was valid when it was created. This allows individuals to rotate their SSH keys by keeping track of when each key was valid without invalidating any objects previously signed using an older key.
Git 2.35 also supports new key types in the ‘user.signingKey’ configuration when the developers include the key verbatim (instead of storing the path of a file that contains the signing key). Developers can specify literal SSH keys with keytypes that don’t begin with “ssh-” (like ECDSA keys).
The new version introduces a new mode, ‘zdiff3’, which moves any lines in common at the beginning or end of a conflict outside of the conflicted area.
In Git 2.35, the ‘—histogram’ has received a performance boost. The new version also includes a variety of performance improvement for ‘–color-moved-ws’.
In the new Git 2.35, ‘git jump merge’ has learned to narrow the set of merge conflicts using a pathspec. While resolving a big merge conflict, if the developers want to on a specific section, they can run: ‘$ git jump merge – foo’ to only focus on conflicts in the ‘foo’ directory.
In Git 2.35, developers can specify how ‘git am’ will behave, should it encounter an empty commit with ‘–empty=<stop|drop|keep>’. These options instruct ‘am’ to either halt applying patches entirely, drop any empty patches, or apply them as-is (creating an empty commit, but retaining the log message). If the user forgets to specify an ‘—empty’ behavior but tries to apply an empty patch, they can run ‘git am –allow-empty’ to apply the current patch as-is and continue.
For more detailed updates, take a look at the documentation here.