Releases: arxanas/git-branchless
v0.3.12
v0.3.11
To install or update git-branchless
, run the following:
$ cargo install --locked git-branchless
$ git branchless init # in your repository
If you haven't already taken the user survey, please consider doing so!
Release highlights
This release is a smoke test for git-branchless having been broken into multiple crates, so please report any unexpected compilation issues on the issue tracker.
git-branchless v0.3.12 was also released, with no additional changes from v0.3.11.
Changelog
Added
- Added
--discard
flag togit reword
to start with a clean commit message.
Fixed
- (#326)
git restack
now restacks certain branch commits which it missed before.
v0.3.10
To install or update git-branchless
, run the following:
$ cargo install --locked git-branchless
$ git branchless init # in your repository
NOTE: when installing this version with --locked
, you may see a warning like this:
warning: package `crossbeam-channel v0.5.2` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
This is safe to ignore. We are waiting for an upstream dependency to be updated to resolve this warning. This is tracked in #317.
Release highlights
This release introduces the following new commands:
git sync
(demo, docs): rebase all commit stacks on top of the main branch without checking them out.git reword
(docs): update the commit message of one or multiple commits without checking them out (thanks to @claytonrcarter).git branchless bug-report
: generate debugging information to attach to a Github issue.
Additionally, git undo
has a breaking change; see below.
Changelog
Added
- EXPERIMENTAL: created
git sync
command, which moves all commit stacks onto the main branch (if possible). - EXPERIMENTAL: created
git reword
command, which can rewrite commit messages anywhere in the commit tree. - The
--only-branches
option can be passed togit smartlog
to only show commits which are on branches. - The
git move
command, and other commands which can move commits, now accepts the option--no-deduplicate-commits
to skip commit deduplication.
Changed
- (#286) The smartlog now displays an icon next to the currently-checked-out branch.
- (#289) Changed output wording for
git hide
/git unhide
. - BREAKING:
git undo
now undoes the most recent operation by default (after confirming). The interactive behavior is available with the-i
/--interactive
flag.
Fixed
- (#267) Aliases like
git amend
are now installed only if the user does not already have aliases with the same name. Thanks to @rslabbert for implementing this. - Improved performance up to 15x for
git restack
on large commit histories. - (#280) Ambiguous commit hashes are no longer printed in output. (Additional characters of the hash will be appended as necessary.) Thanks to @yujong-lee for fixing this.
New contributors
Thanks to the following first-time contributors!
- @rslabbert made their first contribution in #267
- @claytonrcarter made their first contribution in #296
- @yujong-lee made their first contribution in #306
If you're interested in contributing, check out the Developer Guide in the Wiki, or post in the Discussions or Discord server to ask any questions.
v0.3.9
To install or update git-branchless
, run the following:
$ cargo install --locked git-branchless
$ git branchless init # in your repository
Release highlights
- This release fixes a bug which several users reported. As always, thanks for your reports!
Changelog
Fixed
v0.3.8
To install or update git-branchless
, run the following:
$ cargo install git-branchless
$ git branchless init # in your repository
Release highlights
git next
/git prev
now take--all
/--branch
/--merge
/--force
options.- Added two new experimental commands:
git branchless checkout
: to interactively check out a commit from the smartlog via fuzzy-finding.- Suggested alias:
git config alias.co 'branchless checkout'
.
- Suggested alias:
git branchless amend
: to amend changes into the current commit, and restack any descendants.- Suggested alias:
git config alias.amend 'branchless amend'
.
- Suggested alias:
- These commands are not aliased by default.
- Thanks to @bcongdon for implementing these!
- I started a Discord server for those who prefer more ephemeral discussion formats. Feel free to ask any workflow questions, etc. there.
Changelog
Added
- New
git branchless checkout
command, which enables you to interactively pick a commit to checkout from the commits tracked in the smartlog. git next
accepts an--interactive
flag which, if set, prompts which commit to advance to in ambiguous circumstances. This can be enabled by default with thebranchless.next.interactive
config setting.- References created for garbage collection purposes no longer appear in
git log
by default. - References created for garbage collection purposes are no longer generated unless you've run
git branchless init
in the repository. git next
andgit prev
accept-a
/--all
to take you all the way to a head or root commit for your commit stack, respectively.git next
andgit prev
accept-b
/--branch
to take you to the next or previous branch for your commit stack, respectively.- New
git branchless amend
command that amends the current HEAD commit, and automatically performs a restack. git next
andgit prev
accept-m
/--merge
to merge unstaged changes when checking out to the destination commit.git next
andgit prev
accept-f
/--force
to discard unstaged changes when checking out to the destination commit.git branchless init
warns if the configuration valuecore.hooksPath
is set.
Fixed
- (#151)
ORIG_HEAD
is populated correctly, which means that Git commands which write toORIG_HEAD
don't accidentally clobber unrelated branches. - (#155)
git branchless init
now appends to your existing hooks, rather than silently doing nothing. - (#172) When carrying out an on-disk rebase operation with
git move
, callinggit rebase --abort
will correctly reset the branch which you had checked out prior to the rebase. - (#209)
git restack
no longer resurrects commits which were created beforegit branchless init
was run. - (#236)
git restack
no longer checks out back to an abandoned commit in some circumstances.
New Contributors
Thanks to the following first-time contributors!
- @jean-francois-labbe made their first contribution in #163
- @auscompgeek made their first contribution in #155
- @hmenke made their first contribution in #159
- @typesanitizer made their first contribution in #233
I'd also like to thank several users for their high-quality discussions and bug reports, whom I don't list here because the list can't be automatically generated, and I'm afraid I'll omit someone. Your feedback is appreciated!
If you're interested in contributing, check out the Developer Guide in the Wiki, or post in the Discussions or Discord server to ask any questions.
v0.3.7
To install or update git-branchless
, run the following:
$ cargo install git-branchless
$ git branchless init # in your repository
Release highlights
- Fixed a panic in
git move
. - Move/restack operations now require you to specify
--merge
in order to start merge conflict resolution. - You can configure colorization using the
--color
option orCLICOLOR
/NOCOLOR
environment variables (@bcongdon). - The
init.defaultBranch
Git config setting is respected when runninggit branchless init
(@bcongdon).
Thanks to @bcongdon for several contributions this release, and thanks to everyone else who provided valuable feedback in the Discussions!
Changelog
Added
git branchless init
takes a--main-branch
option to specify the name of the main branch without interactive prompting.- The
--color=[auto,always,never]
flag can be used to override the automatically detected value for terminal colors. - The
CLICOLOR
andNOCOLOR
environment variables are now respected.
Changed
- BREAKING: If your local main branch has an upstream branch, then that upstream branch will be treated as the repository's main branch, and your local main will be treated as a branch like any other. This should make workflows which commit to the main branch more ergonomic.
- BREAKING:
git move
andgit restack
will no longer perform merge conflict resolution unless the--merge
option was passed. git branchless init
will useinit.defaultBranch
when detecting the name of the main branch, if one is not provided by--main-branch
.- (#144) When automatic garbage collection is run, the number of deleted references is displayed.
Fixed
- On-disk rebases on systems with
/tmp
residing on a different filesystem should no longer fail. - (#129)
git move
operations with--dest
referring to a remote commit no longer panic.
v0.3.6
To install or update git-branchless
, run the following:
$ cargo install git-branchless
$ git branchless init # in your repository
Release highlights
- The documentation has been significantly expanded. See the new command overview at the Wiki.
- High-quality documentation is a first-class goal for this project, so leave any feedback, suggestions, or thoughts in Discussions.
- Thanks to @IvanVas, @AriaFallah, and others for their feedback so far.
- More performance improvements for large repositories.
- Configuration is no longer written directly to your
.git/config
. Instead, it's written into a separate file andinclude
d. - Bug fix where some output from subcommands was overwritten by progress indicators.
Changelog
Added
- The
-C
option can be used to set the working directory forgit-branchless
commands. - The
--hidden
option can be passed togit smartlog
to show commits which are not ordinarily visible.
Changed
- Git configuration is written to a file under
.git/branchless
, instead of writing it directly to.git/config
(which may clobber user settings).
Fixed
- Output of subcommands is no longer overwritten by progress updates.
- Improved performance up to 100x for commit deduplication during
git move
when rebasing past certain large commits. - Improved performance up to 10x for smartlog rendering.
v0.3.5
To install or update git-branchless
, run the following:
$ cargo install git-branchless
$ git branchless init # in your repository
Release highlights
git move
is ready for general use. Try it out as a lightning-fast replacement forgit rebase
:git move -s <commit>
: movecommit
and its descendants onto the current commit.git move -d main
: rebase the current commit stack on top ofmain
.git move -b <commit1> -d <commit2>
: move the stack containingcommit1
ontocommit2
.- It doesn't yet replace
git rebase -i
. Stay tuned for a future release. - It can rebase merge commits, similar to
git rebase --rebase-merges
. If this is part of your workflow, tell me about it in the linked discussion for this release.
git restack
now tries to rebase in-memory before falling back to an on-disk rebase. This should speed it up noticeably in most cases.- Performance of
git smartlog
has been improved on large repositories by switching to the Eden SCM's directed acyclic graph implementation. You can expect further performance improvements as I port more of the code to use Eden. Thanks to @quark-zju for answering my questions to help me integrate it.
Changelog
Added
- Merge commits can be rebased by
git move --on-disk
. This uses the same system asgit rebase --rebase-merges
.
Changed
- (#63) The UI for
git undo
has been changed in various ways. Thanks to @chapati23 for their feedback. You can leave your own feedback here: https://github.com/arxanas/git-branchless/discussions - Merge-base calculation is now performed using EdenSCM's directed acyclic graph crate (
esl01-dag
), which significantly improves performance on large repositories. - Subprocess command output is now dimmed and printed above a progress meter, to make it easier to visually filter out important
git-branchless
status messages from unimportantgit
machinery output. git move
tries to avoid issuing a superfluousgit checkout
operation if you're already at the target commit/branch.git restack
uses in-memory rebases by default.
Fixed
git restack
warns if a sub-command fails (e.g. ifgit rebase
fails with merge conflicts that need to be resolved).- (#57)
git undo
shows an informative link when dealing with empty events, rather than warning about a bug. Thanks to @waych for reporting. - Flickering in
git undo
's rendering has been reduced. - Commits made via
git merge
are now recorded in the event log. - Long progress messages are now truncated on narrow screens.
- In-memory rebases on large repositories are now up to 500x faster.
git smartlog
no longer crashes after you've just rungit checkout --orphan <branch>
.- In-memory diffs on large repositories (used for commit deduplication) are now up to 100x faster.
- Invocations of
git-branchless
commands which called subprocesses and then exited quickly no longer fail to print the subprocess output.
v0.3.4
Release highlights
git-branchless
is now licensed under the GPL-2.- Progress indicators are shown during slow operations, which can be helpful when working in large repositories.
- The long-term goal is to significantly speed up those operations by improving on the implementations offered in libgit2.
- When you rebase your work onto the main branch,
git move
will now clean up (delete) branches which point to commits which have been applied upstream. This means you can sync a local commit stack with e.g.git move -b <branch> -d master
, and any already-merged branches will be automatically deleted.- The later goal is to have a
git sync
command which will bring all of your local-branches up to date. - If a branch was deleted in error, you can always get it back with
git undo
.
- The later goal is to have a
Changelog
Added
git move
now supports forcing an in-memory rebase with the--in-memory
flag.- The
reference-transaction
hook prints out which references were updated. git restack
can now accept a list of commit hashes whose descendants should be restacked, rather than restacking every abandoned commit indiscriminately.git move
will skip applying commits which have already been applied upstream, and delete their corresponding branches.- Progress indicators are now displayed when
git-branchless
takes longer than 250ms to complete.
Changed
- BREAKING:
git-branchless
is now licensed under the GPL-2. - More of the Git hooks installed by
git-branchless
display the affected objects, rather than just the number of affected objects. git move
with no--source
or--base
option now defaults to--base HEAD
rather than--source HEAD
.
Fixed
- The output of
git
subcommands is streamed to stdout, rather than accumulated and dumped at the end. - Commits rebased in-memory by
git move
are now marked as reachable by the Git garbage collector, so that they aren't collected prematurely. git-branchless wrap
correctly relays the exit code of its subprocess.- Some restack and move operations incorrectly created branches without the necessary
refs/heads/
prefix, which means they weren't considered local branches by Git. - Some restack and move operations didn't relocate all commits and branches correctly, due to the experimental
git move
backend. The backend has been changed to use a constraint-solving approach rather than a greedy approach to fix this. git move
preserves committer timestamps whenbranchless.restack.preserveTimestamps
is set. The configuration key may change in the future.- If your currently-checked-out commit was rewritten during a
git move
operation, it now checks out the new version of the commit, rather than leaving you on an old, hidden commit. - If your current stack had another stack branching off of it, and
git move --base
was passed a commit that other stack, it would fail with a cyclic dependency error. It now clips off the unique part of the branch and moves it. - If an on-disk rebase would occur (such as the result of
git move
orgit restack
), but you have uncommitted changes in your working copy, the rebase is aborted and a warning is printed, rather than potentially clobbering your changes.
v0.3.3
Release highlights
This release primarily improves the new user experience.
Changelog
Added
git branchless init
will attempt to detect the correct main branch name to use for the repository. If not automatically detected, it will prompt for the branch name.git branchless init --uninstall
will uninstallgit-branchless
from the repository.
Fixed
- The version number in
git-branchless --help
was fixed at0.2.0
. It now reflects the version of the package. git branchless wrap
no longer fails to run if there is no Git repository in the current directory.- User hooks which are invoked by
git-branchless
are now invoked in the correct working directory.