Recently released Git 2.10 adds a few useful features to push, including more accurate progress info, support for extra options, and an improved --force-with-lease. Additionally, a few new options make working with signatures more convenient, and coloring schemes can use italic and strikethrough styles.
Among the improvements to git push are:
-
git push --force-with-lease, which will ensure you do not overwrite a simultaneous push by some other contributors, now make sure a new ref is created. This makes it unnecessary to useupdate-refbefore doing apushafter afetchnot followed bymerge. -
to reduce the risk of confusion, a
remote:prefix is now added on the client side to messages generated on the server bygit gcduring apush.git gcruns a number of housekeeping tasks, such as compressing file revisions, and is run automatically by certain commands. -
the new
--push-optionflag allows developers to pass extra options to the receiving end for the pre-receive and the post-receive hooks. -
git pushnow produces more accurate reports for tasks that are run on the server after the push payload has been received. GitHub has published a nice description of the feature.
The worktree command has also got a couple of improvements, including:
-
git worktree addcan now use-as a short-hand for the previous branch, fully represented a@{-1}. -
git worktree lockallows developers to prevent a linked working tree stored on a portable device or network share that is not always mounted from being pruned. Previously, developers were expected to lock a worktree by manually creating a file namedlockedalong with other administrative files in the worktree.
As mentioned, working with signatures has become easier in Git 2.10. Indeed, git log and other commands will now display the full 64 bit key-id. Moreover, git log can be made to show signatures by default using the new log.showSignature configuration variable, that can be overridden using the --no-show-signature flag. Additionally, git pull --rebase will now warn users that passing the --verify-signature is a no-op.
Finally, output color schemes have been enriched by adding support for italic and strike-through text, which can be combined with other coloring options.
Git 2.10 includes many more new features, improvements, and bug fixes that are listed in the release notes.