bit
is an experimental modernized git CLI built on top of git that provides happy defaults and other niceties:
- command and flag suggestions to help you navigate the plethora of options git provides you
- autocompletion for files and branch names when using
bit add
orbit checkout
- automatic fetch and branch fast-forwarding reducing the likelihood of merge conflicts
- suggestions work with git aliases
- new commands like
bit sync
that vastly simplify your workflow - commands from git-extras such as
bit release
&bit info
- fully compatible with git allowing you to fallback to git if need be.
- get insight into how bit works using
bit --debug
.
--- New ---
-
bit pr
view and checkout pull requests from Github (Requires GitHub CLI) - easily update bit using
bit update
- single binary (no more bitcomplete) add classical tab completion with
bit complete
--- Coming Soon ---
- improved
bit sync
- more completions!
new versions of bit can now update using bit update
Like bit? Sponsor bit for as little as $5
curl -sf https://gobinaries.com/chriswalz/bit | sh;
bit complete;
echo "Type bit then press <ENTER> to show interactive prompt"
bit;
To overwrite installation location
export PREFIX=/opt/bit/git && mkdir -p ${PREFIX} ## optional: override default install location /usr/local/bin
bit
, bit checkout
& bit switch
will show interactive prompts after you press ENTER
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
export GOPATH=$HOME/go
export GOBIN=$(go env GOPATH)/bin
GO111MODULE=on go get github.com/chriswalz/bit@latest;
bit complete
brew install bit-git
bit complete
bit
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
zinit ice lucit wait"0" as"program" from"gh-r" pick"bit"
zinit light "chriswalz/bit"
Note: On Windows only the interactive prompt completion works not classic tab completion
Verify installation with:
bit
Dependencies: Git
Platform Support:
- iTerm2 (macOS)
- Terminal.app (macOS)
- Command Prompt (Windows)
- WSL/Windows Subsystem for Linux (Windows)
- gnome-terminal (Ubuntu)
Customization:
BIT_THEME=inverted
BIT_THEME=monochrome
Create a new commit
bit save [commit message]
Save your changes to the current branch [amends current commit when ahead of origin]
bit save
Synchronize your changes to origin branch (Beta)
bit sync
You have access to ALL git commands as well.
bit commit -m "I can still use git commands"
, bit pull -r origin master
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]
bit sync
- Automatic fetching & fast forwarding to keep your branches up to date and prevent merge conflicts
- Simplify your entire rebase workflow with a single command
bit sync
- Automatic suggestions at your fingertips
bit
is fully compatible withgit
. All features of git are available if need be.
- 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
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
- https://news.ycombinator.com/item?id=24751212
- https://www.tldrnewsletter.com/archives/20201007
- https://www.reddit.com/r/golang/comments/j5wggn/bit_an_experimental_git_cli_with_a_powerful/
- https://b.hatena.ne.jp/entry/s/github.com/chriswalz/bit
- https://news.hada.io/topic?id=2990
- https://twitter.com/newsycombinator/status/1315517850954727424
- https://forum.devtalk.com/t/bit-a-modernized-git-cli-written-in-go/3065
- https://gocn.vip/topics/11063
- https://golangweekly.com/issues/333
- https://archive.faabli.com/archive/2020-10-09
- https://www.wykop.pl/wpis/52945683/unknownews-wolanie-nie-dziala-zapisz-sie-lepiej-na/
- https://blog.csdn.net/a419240016/article/details/109178001
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
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
orBIT_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
go binaries are self-contained so uninstalling simply requires deleting the binary(ies)
rm `which bit`
rm `which bitcomplete`