# bit **Repository Path**: sanjiankethree/bit ## Basic Information - **Project Name**: bit - **Description**: 汉化github上bit工具的命令 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-10-15 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 加入组织 让我们一起学习成长,关注公众号获得每日一个知识点的储备,让我们一起成长 ![输入图片说明](https://images.gitee.com/uploads/images/2020/1012/211345_e216e60c_1168339.jpeg "架构技术.jpg") `bit` 是一个实验性的现代化git CLI,它建立在git之上,提供了快乐的默认值和其他特性: - command and **flag suggestions** 来帮助你浏览git为你提供的大量选项 - 当使用 "bit add "或 "bit checkout "时,文件和分支名称的自动完成 `bit add` or `bit checkout` - 自动获取和 **branch fast-forwarding** 减少合并冲突的可能性 - 建议 **work with git aliases** - 新的命令,如 `bit sync`,大大简化了你的工作流程 - 来自 **git-extras** 的命令,如: `bit release` & `bit info` - **fully compatible with git** 允许你在需要的时候回退到git. ## 安装 / 更新 ### 使用 `cURL` (最简单的安装方式) ```shell script curl -sf https://gitee.com/oscste/bit | sh; curl -sf https://gitee.com/oscste/bit/bitcomplete | sh && echo y | COMP_INSTALL=1 bitcomplete; bit; ``` ### 使用 `go` (更难安装的方法) *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* ```shell script export GOPATH=$HOME/go export GOBIN=$(go env GOPATH)/bin ``` ```shell script GO111MODULE=on go get gitee.com/oscste/bit@latest; GO111MODULE=on go get gitee.com/oscste/bit/bitcomplete@latest; COMP_INSTALL=1 bitcomplete; ``` #### using `go` (For Windows Users) ```shell script go env -w GO111MODULE=on # if latest is not working, replace it with the latest tag found here https://gitee.com/oscste/bit/releases go get gitee.com/oscste/bit/bit@latest; bit ``` #### using `zinit` ```shell script 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) ## Bit specific command Usage 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. 90% of the time the above commands will have you covered. `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"` [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` ## Features - 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** with `git`. All features of git are available if need be. ###### Common commands at your finger tips

bit

###### Commit, bump a tag and push with a single command

bit

###### Instant git statistics and config information

bit

## Principles 1. Think in the age of the cloud 1. Embed the spirit of modern day workflows 1. Favor simplicity over complexity 1. Bit should have happy defaults 1. Bit must be fully compatible with Git ## Inspiration Thanks to [Gitless](https://gitless.com/), [git-extras](https://github.com/tj/git-extras), researchers in the field and of course the developers of `git` itself! Also, thanks to [go-prompt](https://github.com/c-bata/go-prompt) for the interactive prompt library ## News - 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 ## Changelog v0.6 - [X] fix: improved git compatibility for older versions of git - [X] feature: emacs key binds - [X] feature: relative and absolute branch times - [X] feature: completions for rebase & log - [X] enhancement: smarter suggestions - [X] fix: show proper descriptions for some flags - [X] fix: prevent panic on classical tab completion for some users v0.5 - [X] `bit switch`, `bit co`, `bit checkout` will show prompt - [X] fix bit tab completion (bitcomplete) - [X] fix edge case where there is an invalid ref - [X] various minor fixes - [X] more completions - [X] better suggestion filtering - [X] absolute and relative times for branch suggestions v0.4 - [X] multiline support with Go Survey Library - [X] color mitigation to have roughly similar colors across OSs - [X] fix README go get installation instructions - [X] QOL improvements for `bit sync` ## How to uninstall *go binaries are self-contained so uninstalling simply requires deleting the binary(ies)* ``` rm `which bit` rm `which bitcomplete` ```