Linux command
git-branchless 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Initialize git-branchless
git branchless init
Show smart log
git sl
Undo the last git operation
git undo
Sync all local branches
git sync
Move a commit
git move -s [commit] -d [destination]
Navigate to next commit
git next
Navigate to previous commit
git prev
Show hidden commits
git sl --hidden
说明
git-branchless is a suite of tools that enhances Git for high-velocity, monorepo-scale workflows. It implements concepts from other version control systems like Mercurial and Meta's internal tools. The smartlog (git sl) provides an intuitive visualization of your commit graph, showing only relevant commits. Unlike git log, it focuses on work in progress rather than full history. The undo command can reverse almost any Git operation, including hard resets, rebases, and commit amendments. It maintains a hidden log of repository states. Git-branchless uses revset expressions, a declarative language for specifying commits similar to Mercurial. This enables powerful queries like stack() (all commits in current stack) or draft() (local unpublished commits). The move command allows relocating entire commit subtrees without affecting the working copy, automatically cleaning up obsolete branches.
参数
- -C _path_
- Run as if started in the specified directory.
- --color _when_
- Control color output: always, never, auto.
- --hidden
- Show hidden commits (with smartlog).
- -h, --help
- Display help information.
- -V, --version
- Show version number.
FAQ
What is the git-branchless command used for?
git-branchless is a suite of tools that enhances Git for high-velocity, monorepo-scale workflows. It implements concepts from other version control systems like Mercurial and Meta's internal tools. The smartlog (git sl) provides an intuitive visualization of your commit graph, showing only relevant commits. Unlike git log, it focuses on work in progress rather than full history. The undo command can reverse almost any Git operation, including hard resets, rebases, and commit amendments. It maintains a hidden log of repository states. Git-branchless uses revset expressions, a declarative language for specifying commits similar to Mercurial. This enables powerful queries like stack() (all commits in current stack) or draft() (local unpublished commits). The move command allows relocating entire commit subtrees without affecting the working copy, automatically cleaning up obsolete branches.
How do I run a basic git-branchless example?
Run `git branchless init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -C _path_ do in git-branchless?
Run as if started in the specified directory.