github arxanas/git-branchless v0.4.0

latest releases: v0.9.0, v0.8.0, v0.7.1...
22 months ago

To install or update git-branchless, run the following:

$ cargo install --locked git-branchless
$ git branchless init  # in your repository

If you see an error like failed to select a requirement libgit2-sys, then you need to update your version of Rust. See the troubleshooting section.

If you haven't already taken the user survey, please consider doing so!

Release highlights

🎉 This release includes the 1000th commit to git-branchless! 🎉

There are two exciting features in this release:

  • git move accepts the -x/--exact and -I/--insert flags to move commits much more precisely than previously possible.
    • Huge thanks to @claytonrcarter, who implemented these, which required a lot of tricky code.
  • git-branchless commands which used to accept single commits now accept revset expressions, similar to Mercurial.
    • Revsets are a declarative language which allows specifying commits in a much more flexible manner than is supported by Git.
    • You can use the new git query command as an interface to try out your revset queries.

See Revset recipes for some ideas on how to use git move and revsets together or contribute your own.

On a logistical note, we will be incrementing the minor version number by default in future versions of git-branchless. Minor versions will include new features and may include breaking changes (while we are still on version 0.x.y). The patch version number will be used for backward-compatible bug-fixes, as SemVer intended.

Changelog

Added

  • Numerous updates to git branchless move:
    • (#400) Added --insert option to to insert the moved subtree or commits into the commit tree between the destination commit and its children, if any.
    • (#450) Added --exact option to move a specific set of commits elsewhere in the commit tree. They will be removed from their current location and any unmoved children (if any) will be moved to their closest unmoved ancestor. The moved commits will maintain their overall ancestry structure.
    • (#447) --source, --base and --exact options can all be provided multiple times to move multiple subtress, ranges and/or commits to the destination.
  • Added --yes option to git undo to skip confirmation.
  • (#366) Added bulk edit mode to git reword to allow updating multiple, individual commit messages at once.
  • (#398) Added support for revset expressions in most commands.
    • Created the git query command to dump the results of revset queries.
  • (#399) Added --delete-branches option to git hide.
  • (#435) Created the git branchless repair command, which is occasionally useful for cleaning up garbage-collected commits from the smartlog.
  • EXPERIMENTAL: (#382) Working copy snapshots are created before potentially-destructive operations in order to improve the capabilities of git undo.
    • Working copy snapshots are taken by default. Disable by setting branchless.undo.createSnapshots to false.
  • EXPERIMENTAL: (#391) created the git record command, which opens an interactive change selector for committing.

Changed

  • BREAKING: (#422) Rust v1.61 or later is required to build.
  • BREAKING: (#472) git smartlog no longer supports the --only-branches option. Instead, use git smartlog 'branches()'.
  • BREAKING: (#479) git move will abort when trying to move public commits; you now have to pass --force.
  • (#397) When editing only a single commit message with git reword, the marker line is omitted.

Fixed

  • (#342) Commands which automatically show the smartlog after them no longer show it in gray with ASCII glyphs. This reverts the behavior to that of before v0.3.11.
  • (#358) Adjusted the misleading suggestion that was printed when running a git amend invocation which produced merge conflicts.
  • (#359) Fixed the smartlog output when running git undo. Previously, it showed the smartlog as if you were still at the HEAD location before the git undo.
  • (#387) git reword now reads from $GIT_EDITOR, etc. via the git var command.
  • (#418) When running git smartlog or similar, any commits which would show up are now kept live for garbage-collection purposes, even if git-branchless didn't observe them being committed.

Don't miss a new git-branchless release

NewReleases is sending notifications on new releases.