All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- (#1461): added
!revset postfix operator as shortcut for "only child" - (#1464): created
git splitcommand to extract changes from a commit - (#1603): added
git move --dry-runto test in-memory rebases - (#1604):
git recordandgit amendcan now automatically detect and begin tracking new files (optional, disabled by default) - (#1632): added
git record --fixupoption, to create a fixup commit (similar toreword --fixup)
- (#1270):
git smartlognow renders with curved corners - (#1271):
git smartlogrenders commit nodes more consistently with other nodes - (#1462) BREAKING:
git recordwill use a default commit message with--stash(instead of prompting for one) - (#1463):
git switchnow accepts a revset whose sole head will be checked out, and correctly treats-to mean last checked out commit or branch - (#1492):
scm-recordupgraded to v0.5.0. - (#1591): improved performance of some revset expressions
- (#1593) BREAKING:
The minimum supported Rust version (MSRV) is now 1.82.See #1638 below. - (#1638) BREAKING: The minimum supported Rust version (MSRV) is now 1.86, and the rust edition is now 2024.
- (#1439): fix panic with custom git status configuration
- (#1611): fix behavior of
git record --stashon a detached HEAD - (#1618): fix behavior of various commands when operating on branches that have the same name as files in the current directory
- (#1355):
git submitnow supports the--jobsargument for parallelism.
- (#1322): Fixed the processing of symbolic refs in reference-transaction lines (since Git v2.46+).
- (#1353):
git submitwith the Phabricator forge now ignores untracked working copy changes. - (#1363): git-branchless now supports index version 4 (via
libgit2upgrade). - (#1393): Branches with multivars in their configuration can now be deleted (via
libgit2upgrade).
- (#1129) Added a
--dry-runoption togit submitto report what would be submitted without actually doing so. - (#1130) Added
merges()revset function. - (#1130) The
branches()revset function now accepts an optional text pattern argument to limit which branches are matched. - (#1150) The
git recordcommand now accepts-s/--stashto return to the previous commit immediately after committing. - (#1167) The commit message for a new commit can now be written/edited during
git record --interactive. - (#1169)
git recordnow accepts multiple--messagearguments. - (#1184) An initial Github forge was implemented as
git submit --forge github, but it's too buggy for general use. - (#1241)
git smartlognow accepts--exactto skip renderingHEADand the main branch. - (#1244)
git submitnow accepts multiple arguments/revsets.
scm-recordupgraded to v0.3.0.- BREAKING (#1128) Arguments/revsets passed to
git syncare now resolved to their respective stacks.- This allows
git sync my-branchto work as expected, instead of needing to usegit sync 'stack(my-branch)'. The behavior ofgit syncwhen called without arguments is not affected by this change. If you rely on the previous behavior, please usegit move -x <commit(s)/revset> -d 'main()'instead.
- This allows
- BREAKING (#1152) Previously,
git hidewould not delete branches pointing to the hidden commits unless-D/--delete-brancheswas passed. Now, deleting branches is the default behavior. Pass--no-delete-branchesto restore the old behavior. - BREAKING (#1292): The minimum supported Rust version (MSRV) is now 1.82.
- (#1204) The default instructions for
git rewordare now wrapped to 72 characters. - (#1230) The icon for omitted commits in the smartlog was changed from
⊘to◌.
- (#1071) The Apache and MIT licenses are now distributed with each constituent crate, not just the top-level
git-branchlesscrate. - (#1072) The current branch is no longer detached during
git amendwhen the current commit has descendants. - (#1073) Merge commits can now be amended with
git amend. - (#1095) The event log is now shared between all worktrees. Before, commits that were made in one worktree wouldn't be visible in other worktrees, etc.
- (#1095)
git submitnow runs in worktree that you invoked it in. - (#1095)
git submit --forge phabricatorno longer records spurious commits whenarc diffing. - (#1127) Improved support for files with spaces in their name.
- (#1267) The correct "path" variable is now used on Windows, which fixes some cases of
git-branchlessfailing on native Windows.
- (#545) EXPERIMENTAL: Added a
--fixupoption togit moveto squash moved commits into the destination - (#830) Added
git branchless install-man-pagescommand. This may be useful for package maintainers or those who install git-branchless from source. - (#840) git-branchless supports Phabricator as a backend forge for
git submit. - (#845) Added the
branchless.smartlog.defaultRevsetconfiguration variable. - (#910) Added support for repositories managed by the
repotool. - (#1009) Added
git branchless difftoolsubcommand.
- BREAKING (#841): git-branchless is now dual-licensed as MIT/Apache 2.0.
- BREAKING: (#1024) Rust v1.67 or later is required to build.
- (#825)
git submitonly fetches the necessary branches, rather than all branches, before pushing. - (#826) Switch to
scm-recordcrate to provide the partial commit interface. - (#914) The default revset for
git restackis nowdraft().
- (#866) New commits created during
git rebaseare no longer kept if the rebase is aborted. - (#866)
git testno longer clobbers working copy changes. - (#876) After
git amend, detached branches previously pointing to the amended commit are now updated. - (#915) Fixed certain situations of rebasing merge commits when all parents have also been rebased.
- (#920) Running
git syncwhen the main branch is checked out no longer leaves a dirty index. - (#938) Somehow fixed mysterious hang.
- (#830) Added
git branchless install-man-pagescommand to generate and install man-pages. This is primarily intended for those packaging git-branchless for package management systems.
- (#844) Fixed build for NetBSD.
- (#646)
git amendnow supports a--reparentoption to adjust the contents of a commit while keeping the children commits exactly the same. - (#686)
git branchless initwill now populate the internal commit graph structure, rather than waiting for the first invocation of agit branchlesssubcommand. - (#725) Added
siblings()revset function to determine the siblings of a given commit. - (#725) Added an
-I/--insertoption togit recordto insert the new commit before all of the current commit's children. - (#763) Added a
-d/--detachoption togit branchless switchto switch to a commit without checking out any associated branches (as might happen due to thebranchless.navigation.autoSwitchBranchesconfiguration variable), or to switch to a branch without checking it out. - (#766) Added a
git test fixsubcommand to apply formatters/linters/etc. to a set of commits. - (#777) Added the
--searchoption togit test runto search a set of commits using linear or binary search for the first commit(s) which cause the tests to fail. - (#777)
git test runnow aborts the overall test run when a test returns exit code127. - (#777)
git test runnow sets theBRANCHLESS_TEST_COMMITandBRANCHLESS_TEST_COMMANDenvironment variables when running the test command. - (#785) Added
tests.passed(),tests.failed(), andtests.fixable()revset functions, whose results are populated bygit test. - (#790) Added the
--reverseoption togit smartlog.
- (#730) BREAKING: The default revset for
git rewordis nowstack() | @instead of@, to simultaneously reword all commits in the current stack. - (#763) BREAKING:
git branchless switchno longer implicitly opens the interactive commit selector when no target is provided. You must explicitly pass-i/--interactiveto do so. - (#801) BREAKING: The parameter to
git recordhas been renamed from-b/--branchto-c/--create. - (#685)
git submitnow colorizes the names of the affected branches. - (#763) Running
git branchless switchwith no arguments will switch to the branch associate with the current commit, if there is exactly one such branch and thebranchless.navigation.autoSwitchBranchesconfiguration variable is set totrue. - (#791) The name for the temporary file created by
git rewordis now of the formCOMMIT_EDITMSG-*.txt, which your editor can use to detect it as a Git commit message file. - (#811) The styling for
git testprogress and output has been changed.
- (#646) Adjusted messaging during merge conflicts with
git move --in-memoryto be more accurate. - (#647)
git test runnow recovers from previously-failed tests instead of failing indefinitely in future runs. - (#670)
git submitno longer force-pushes the current branch in the circumstance that all branches are currently up-to-date. - (#688)
git amendnow respects the--mergeoption. - (#722)
git rewordnow supports invoking editors with spaces in their names. - (#724)
git branchless initnow installs apost-applypatchhook, for users ofgit am. - (#742)
git branchless initnow respects a leading~in thecore.hooksPathconfiguration variable. - (#743)
git sync, etc. now correctly clean up remote branch information for branches which have been merged upstream. Previously, the remote branch information would be left behind, which would cause future branches with the same names to incorrectly become associated with the old remote branch. - (#764)
git syncwill no longer attempt to resolve merge conflicts unless you pass--merge. Previously, this could happen when attempting to sync merge commits.
- (#576) EXPERIMENTAL: Created
git testcommand to run a command on each commit in your stack. - (#589, #593)
git sync --pullrebases the local main branch on top of the remote main branch. - (#619)
git smartlognow renders revsets with non-contiguous commits. - (#638)
git smartlognow deduplicates merge commits which appear in the smartlog.
- (#526) BREAKING: When checking out a commit with a single branch attached to it, that branch will also be checked out.
- (#589) BREAKING: Remote main branches are no longer supported. To upgrade you'll need to create a local main branch which tracks the remote main branch. You can use
git syncto keep it up-to-date. - (#571) Added
current(<revset>)revset function to determine the latest versions of a set of rewritten commits. - (#582) Added
main(),public()revset functions. - (#593, #608)
git syncproduces more descriptive output.
- (#588)
git branchless initnow works when invoked in a worktree. - (#589)
git reword --force-rewriteno longer moves remote-tracking branches. - (#589)
git smartlogno longer uses 100% CPU in certain cases with remote main branches (because remote main branches are no longer supported).
- (#508) Added
exactly(<revset>, n)revset function to allow assertions on the number of commits within a set. - (#509) Users can now define custom revset aliases.
- (#533)
git rewordcan now reword merge commits. - (#534)
git recordnow accepts a--detachoption to avoid moving the current branch. - (#538)
git rewordnow accepts a--fixupoption to convert regular commits intofixup!commits (for use withgit rebase --autosquash) - (#541) EXPERIMENTAL: Created
git submitcommand. Discuss at #564.
- (#543) Commands will produce a better error message for certain unsupported sparse checkout configurations.
- (#507) The
messages()revset function now ignores trailing newlines in commit messages. - (#512) Fixed so that the setting for
--coloris now respected. - (#512) Fixed so that you can pass
--coloranywhere in the command-line, not just before the subcommand. - (#513) Fixed some false positives for hints to run
git restackwhen printing the smartlog. - (#518) Fixed the suggested flag in the error message when attempting to rewrite public commits.
- (#539) Fixed parse errors for certain single-quoted string literals in revset expressions.
- (#559) Fixed precedence for parentheses in revset expressions.
- (#569) Fixed the reversed output order of the results of
git query.
- Numerous updates to
git branchless move:- (#400) Added
--insertoption to to insert the moved subtree or commits into the commit tree between the destination commit and its children, if any. - (#450) Added
--exactoption 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,--baseand--exactoptions can all be provided multiple times to move multiple subtress, ranges and/or commits to the destination.
- (#400) Added
- Added
--yesoption togit undoto skip confirmation. - (#366) Added bulk edit mode to
git rewordto allow updating multiple, individual commit messages at once. - (#398) Added support for revset expressions in most commands.
- Created the
git querycommand to dump the results of revset queries.
- Created the
- (#399) Added
--delete-branchesoption togit hide. - (#435) Created the
git branchless repaircommand, which is occasionally useful for cleaning up garbage-collected commits from the smartlog. - (#382) EXPERIMENTAL: 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.createSnapshotstofalse.
- Working copy snapshots are taken by default. Disable by setting
- (#391) EXPERIMENTAL: created the
git recordcommand, which opens an interactive change selector for committing.
- BREAKING: (#422) Rust v1.61 or later is required to build.
- BREAKING: (#472)
git smartlogno longer supports the--only-branchesoption. Instead, usegit smartlog 'branches()'. - BREAKING: (#479)
git movewill 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.
- (#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 amendinvocation which produced merge conflicts. - (#359) Fixed the
smartlogoutput when runninggit undo. Previously, it showed the smartlog as if you were still at theHEADlocation before thegit undo. - (#387)
git rewordnow reads from$GIT_EDITOR, etc. via thegit varcommand. - (#418) When running
git smartlogor similar, any commits which would show up are now kept live for garbage-collection purposes, even ifgit-branchlessdidn't observe them being committed.
No changes.
- Added
--discardflag togit rewordto start with a clean commit message.
- (#326)
git restacknow restacks certain branch commits which it missed before.
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.
- EXPERIMENTAL: created
git synccommand, which moves all commit stacks onto the main branch (if possible). - EXPERIMENTAL: created
git rewordcommand, which can rewrite commit messages anywhere in the commit tree. - EXPERIMENTAL: created
git branchless bug-reportcommand, which produces information that can be attached to an issue on Github. - The
--only-branchesoption can be passed togit smartlogto only show commits which are on branches. - The
git movecommand, and other commands which can move commits, now accepts the option--no-deduplicate-commitsto skip commit deduplication.
- (#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 undonow undoes the most recent operation by default (after confirming). The interactive behavior is available with the-i/--interactiveflag.
- (#267) Aliases like
git amendare 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 restackon 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.
- (#249) On-disk
git movecommands now ensure that they keep your current branch checked out after the operation. - (#249) On-disk
git movecommands no longer mysteriously move your current branch to a different commit in the stack.
- New
git branchless checkoutcommand, which enables you to interactively pick a commit to checkout from the commits tracked in the smartlog. git nextaccepts an--interactiveflag which, if set, prompts which commit to advance to in ambiguous circumstances. This can be enabled by default with thebranchless.next.interactiveconfig setting.- References created for garbage collection purposes no longer appear in
git logby default. - References created for garbage collection purposes are no longer generated unless you've run
git branchless initin the repository. git nextandgit prevaccept-a/--allto take you all the way to a head or root commit for your commit stack, respectively.git nextandgit prevaccept-b/--branchto take you to the next or previous branch for your commit stack, respectively.- New
git branchless amendcommand that amends the current HEAD commit, and automatically performs a restack. git nextandgit prevaccept-m/--mergeto merge unstaged changes when checking out to the destination commit.git nextandgit prevaccept-f/--forceto discard unstaged changes when checking out to the destination commit.git branchless initwarns if the configuration valuecore.hooksPathis set.
- (#151)
ORIG_HEADis populated correctly, which means that Git commands which write toORIG_HEADdon't accidentally clobber unrelated branches. - (#155)
git branchless initnow appends to your existing hooks, rather than silently doing nothing. - (#172) When carrying out an on-disk rebase operation with
git move, callinggit rebase --abortwill correctly reset the branch which you had checked out prior to the rebase. - (#209)
git restackno longer resurrects commits which were created beforegit branchless initwas run. - (#236)
git restackno longer checks out back to an abandoned commit in some circumstances.
git branchless inittakes a--main-branchoption 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
CLICOLORandNO_COLORenvironment variables are now respected.
- 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 moveandgit restackwill no longer perform merge conflict resolution unless the--mergeoption was passed. git branchless initwill useinit.defaultBranchwhen 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.
- On-disk rebases on systems with
/tmpresiding on a different filesystem should no longer fail. - (#129)
git moveoperations with--destreferring to a remote commit no longer panic.
- The
-Coption can be used to set the working directory forgit-branchlesscommands. - The
--hiddenoption can be passed togit smartlogto show commits which are not ordinarily visible.
- Git configuration is written to a file under
.git/branchless, instead of writing it directly to.git/config(which may clobber user settings).
- Output of subcommands is no longer overwritten by progress updates.
- Improved performance up to 100x for commit deduplication during
git movewhen rebasing past certain large commits. - Improved performance up to 10x for smartlog rendering.
- Merge commits can be rebased by
git move --on-disk. This uses the same system asgit rebase --rebase-merges.
- (#63) The UI for
git undohas 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 @NOCOMMIT: update comment/link - 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-branchlessstatus messages from unimportantgitmachinery output. git movetries to avoid issuing a superfluousgit checkoutoperation if you're already at the target commit/branch.git restackuses in-memory rebases by default.
git restackwarns if a sub-command fails (e.g. ifgit rebasefails with merge conflicts that need to be resolved).- (#57)
git undoshows 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 mergeare 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. See libgit2/libgit2#6036.
git smartlogno 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. See libgit2/libgit2#6036.
- Invocations of
git-branchlesscommands which called subprocesses and then exited quickly no longer fail to print the subprocess output.
git movenow supports forcing an in-memory rebase with the--in-memoryflag.- The
reference-transactionhook prints out which references were updated. git restackcan now accept a list of commit hashes whose descendants should be restacked, rather than restacking every abandoned commit indiscriminately.git movewill skip applying commits which have already been applied upstream, and delete their corresponding branches.- Progress indicators are now displayed when
git-branchlesstakes longer than 250ms to complete.
- BREAKING:
git-branchlessis now licensed under the GPL-2. - More of the Git hooks installed by
git-branchlessdisplay the affected objects, rather than just the number of affected objects. git movewith no--sourceor--baseoption now defaults to--base HEADrather than--source HEAD.
- The output of
gitsubcommands is streamed to stdout, rather than accumulated and dumped at the end. - Commits rebased in-memory by
git moveare now marked as reachable by the Git garbage collector, so that they aren't collected prematurely. git-branchless wrapcorrectly 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 movebackend. The backend has been changed to use a constraint-solving approach rather than a greedy approach to fix this. git movepreserves committer timestamps whenbranchless.restack.preserveTimestampsis set. The configuration key may change in the future.- If your currently-checked-out commit was rewritten during a
git moveoperation, 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 --basewas passed a commit from 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 moveorgit 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.
git branchless initwill 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 --uninstallwill uninstallgit-branchlessfrom the repository.
- The version number in
git-branchless --helpwas fixed at0.2.0. It now reflects the version of the package. git branchless wrapno longer fails to run if there is no Git repository in the current directory.- User hooks which are invoked by
git-branchlessare now invoked in the correct working directory.
git branchless initnow setsadvice.detachedHead false, to reduce the incidence of scary messages.- Aliasing
gittogit-branchless wrapimproves which commands are grouped together forgit undo, and possibly enables more features in the future. git-branchlessbuilds on Windows (#13, #20).- EXPERIMENTAL: Created
git movecommand, which rebases entire subtrees at once. Not currently stable.
- BREAKING: The configuration option
branchless.mainBranchhas been renamed tobranchless.core.mainBranch. The old option will be supported indefinitely, but eventually removed.
- Visible commits in the smartlog sometimes showed the reason that they were hidden, even though they were visible.
- The working copy was sometimes left dirty after a
git undo, even if it was clean beforehand. git-branchlessnow supports Git v2.31.git restacknow doesn't infinite-loop on certain rebase conflict scenarios.git smartlognow doesn't crash for some cases of hidden merge commits.git-branchlessbundles its own version of SQLite, so that the user doesn't need to install SQLite as a dependency themselves (#13).
- Hidden commits which appear in the smartlog now show the reason why they're hidden.
- Historical commits displayed in
git undowere sometimes rendered incorrectly, indicating that they were hidden/visible inappropriately. They now display the true historical visibility.
- BREAKING: Events are now grouped into transactions. This improves the UX around
git undo, since it can undo groups of related events. This breaks the on-disk database format.
Ported to Rust. No new features.
- Performance for repeated calls to Git hooks is significantly improved. This can happen when rebasing large commit stacks.
- The
git undoUI has been changed to use a Rust-specific TUI library (cursive).
First beta release. Supports these commands:
git sl/git smartlog.git hide/git unhide.git prev/git next.git restack.git undo.