GitHub
GIT CHEAT SHEET
Git is the open source distributed version control system that facilitates GitHub activities on your laptop ordesktop. This cheat sheet summarizes commonly used Git command line instructions for quick reference
Git是开源的分布式版本控制系统软件,可以连接电脑和服务器。 该备忘单总结了常用的Git命令行说明,以供快速参考。
INSTALL GIT
GitHub provides desktop clients that include a graphical userinterface for the most common repository actions and an automati-cally updating command line edition of Git for advanced scenarios.
GitHub提供了包括图形用户的桌面客户端最常见的存储库操作和自动执行操作的界面
进阶更新Git的命令行更新版本。
GitHub for Windows
https://windows.github.com
GitHub for Mac
https://mac.github.com
Git distributions for Linux and POSIX systems are available on the official Git SCM web site.
Linux和POSIX系统的Git发行版可在Git SCM官方网站上找到。
Git for All Platforms
http://git-scm.com
MAKE CHANGES
Review edits and craft a commit transaction
审查编辑并制定提交事务
$ git status
Lists all new or modified files to be committed
列出所有要提交的新文件或修改过的文件
$ git diff
Shows file differences not yet staged
显示尚未上传的文件差异
$ git add [file]
Git distributions for Linux and POSIX systems are available on theofficial Git SCM web site. Snapshots the file in preparation for versioning,Git for All Platforms。
可在官方Git SCM网站上获得Linux和POSIX系统的Git发行版。 快照文件以准备版本控制,适用于所有平台。
http://git-scm.com Shows file differences between staging and the last file version
$ git diff --staged
$ git reset [file]
Unstages the file, but preserve its contents
取消暂存文件,但保留其内容
CONFIGURE TOOLING
Configure user information for all local repositories
配置所有本地存储库的用户信息
$ git commit -m "[descriptive message]"
Records file snapshots permanently in version history
在版本历史记录中永久记录文件快照
$ git config --global user.name "[name]"
Sets the name you want attached to your commit transactions
设置要附加到提交事务的名称
$ git config --global user.email "[email address]"
GROUP CHANGES
Name a series of commits and combine completed efforts Sets the email you want attached to your commit transactions
命名一系列提交并结合完成的工作设置要附加到提交事务中的电子邮件
$ git config --global color.ui auto
Enables helpful colorization of command line output
启用命令行输出的有用着色
$ git branch
Lists all local branches in the current repository
列出当前存储库中的所有本地分支
$ git branch [branch-name]
网友评论