Git 2.4 Released With Some New Features

DZone 's Guide to

Git 2.4 Released With Some New Features

· DevOps Zone ·
Free Resource

Git Version Control System 2.4 has released. Most notable features are listed below. Consult this document  for the full list and this one  for a long description,

  • The "sync" subcommand of "git p4" now allows users to exclude subdirectories like its "clone" subcommand does.
  • "git log --invert-grep --grep=WIP" will show only commits that do not have the string "WIP" in their messages.
  • "git push" has been taught an "--atomic" option that makes a push that updates more than one ref an "all-or-none" affair.
  • Extending the "push to deploy" feature that was added in 2.3, the behaviour of "git push" when updating the branch that is checked out can now be tweaked by a "push-to-checkout" hook.
  • "git status" now allows the "-v" option to be given twice, in which case it also shows the differences in the working tree that are not staged to be committed.
  • "git cherry-pick" used to clean up the log message even when it is merely replaying an existing commit. It now replays the message verbatim unless you are editing the message of the resulting commit.
  • "git archive" can now be told to set the 'text' attribute in the resulting zip archive.
  • Output from "git log --decorate" now distinguishes between a detached HEAD vs. a HEAD that points at a branch. This is a potentially backward-incompatible change.
  • When HEAD was detached when at commit xyz and hasn't been moved since it was detached, "git status" would report "detached at xyz" whereas "git branch" would report "detached from xyz". Now the output of "git branch" agrees with that of "git status". This is a potentially backward-incompatible change.
  • "git -C '' subcmd" now works in the current directory (analogously to "cd ''") rather than dying with an error message.
  • The versionsort.prereleaseSuffix configuration variable can be used to specify that, for example, v1.0-pre1 comes before v1.0.
  • A new "push.followTags" configuration turns the "--follow-tags" option on by default for the "git push" command.
  • "git rev-list --bisect --first-parent" does not work (yet) and can even cause SEGV; forbid it. "git log --bisect --first-parent" would not be useful until "git bisect --first-parent" materializes, so also forbid it for now.

Happy branching!

devops, git, scm

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}