# 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 ## 加入组织 让我们一起学习成长,关注公众号获得每日一个知识点的储备,让我们一起成长  `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