BT

Git 2.10 Improves Push and Worktree Commands, Adds Style Options, and More

| by Sergio De Simone Follow 14 Followers on Sep 05, 2016. Estimated reading time: 1 minute |

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 use update-ref before doing a push after a fetch not followed by merge.

  • to reduce the risk of confusion, a remote: prefix is now added on the client side to messages generated on the server by git gc during a push. git gc runs a number of housekeeping tasks, such as compressing file revisions, and is run automatically by certain commands.

  • the new --push-option flag allows developers to pass extra options to the receiving end for the pre-receive and the post-receive hooks.

  • git push now 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 add can now use - as a short-hand for the previous branch, fully represented a @{-1}.

  • git worktree lock allows 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 named locked along 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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT