Create a new commit (roughly equivalent to git commit -am "commit message")
bit save [commit message]
Save your changes to the current branch [amends current commit when ahead of origin]
(roughly equivalent to git commit -a or conditionally git commit -a --amend --no-edit)
bit save
Synchronize your changes to origin branch (Beta)
(roughly equivalent to git pull -r; git push)
bit commit -m "I can still use git commands", bit pull -r origin master
Example Workflow
bit switch example-branch
Branch does not exist. Do you want to create it? Y/n
yes
Switched to a new branch 'example-branch'
[Makes some changes]
bit save "add important feature"
for multiline commits simply don't put the final quote until you're done typing
[fix an error for important feature]
bit save
[push changes to origin]
bit sync
[two days later confirm your branch is in sync with origin branch]
bit sync
[rebase your changes from origin master]
bit sync origin master
Donate
If you would like to support the development of bit, consider sponsoring me.
Principles
Think in the age of the cloud
Embed the spirit of modern day workflows
Favor simplicity over complexity
Bit should have happy defaults
Bit must be fully compatible with Git
Inspiration
Thanks to Gitless, git-extras, researchers in the field and of course the developers of git itself! Also, thanks to go-prompt for the interactive prompt library
fix: bit save will amend commits only when the commit doesn't exist in any other branch
v1.1
enhancement: enable interactive prompt (keep bit running) with env variable: BIT_INTERACTIVE=true
v1.0
enhancement: significantly more autocompletions
enhancement: use fuzzy search for branch suggestions
refactor: completions now represented in tree data structure
fix: bit save no longer shows debug error outside debug mode
fix: use --is-inside-work-tree to determine whether inside a git repo
fix: gracefully handle bad release tags for bit release bump
fix: bit pr not listing PR in some cases
security: fix vuln on Windows where an exe in a malicious repository could run arbitrary code. Special thanks to RyotaK - https://github.com/Ry0taK for identifying this issue
v0.9
enhancement: improve bit sync behavior including bit sync <upstream> <branch>
enhancement: bit sync provides a rebase option for diverged branches`
fix: enable compatibility with non-english languages
enhancement: bit merge suggestions
v0.8
feature: checkout Pull Requests from github (requires gh pr list to work)
enhancement: install with homebrew: brew install bit-git
enhancement: Color themes BIT_THEME=inverted or BIT_THEME=monochrome light terminal backgrounds
fix: bit clone outside a git repo
enhancement: bit is now a single binary
v0.7
feature: update your cli with bit update
v0.6
fix: improved git compatibility for older versions of git
feature: emacs key binds
feature: relative and absolute branch times
feature: completions for rebase & log
enhancement: smarter suggestions
fix: show proper descriptions for some flags
fix: prevent panic on classical tab completion for some users
v0.5
bit switch, bit co, bit checkout will show prompt
fix bit tab completion (bitcomplete)
fix edge case where there is an invalid ref
various minor fixes
more completions
better suggestion filtering
absolute and relative times for branch suggestions
v0.4
multiline support with Go Survey Library
color mitigation to have roughly similar colors across OSs
fix README go get installation instructions
QOL improvements for bit sync
How to uninstall
go binaries are self-contained so uninstalling simply requires deleting the binary(ies)
rm `which bit`
If you ran bit complete optionally remove a line from your bash_profile, .zshrc etc.
complete -o nospace -C /Users/{_USER_}/go/bin/bit bit
bit, bit checkout & bit switch will show interactive prompts after you press ENTER
using go (Harder way to install)
Caveats: GOPATH and GOBIN need to be set. Verify with go env. If they are not set, add this to your .bashrc or .bash_profile etc. AND open new terminal
GO111MODULE=on go get github.com/chriswalz/bit@latest;
bit complete
using Homebrew (For MacOS users)
brew install bit-git
bit complete
bit
Not working? Try brew doctor
using MacPorts (For MacOS users)
sudo port selfupdate
sudo port install bit
using go (For Windows Users)
go env -w GO111MODULE=on
# if latest is not working, replace it with the latest tag found here https://github.com/chriswalz/bit/releases
go get github.com/chriswalz/bit@latest;
bit
请发表评论