没有合适的资源?快使用搜索试试~ 我知道了~
github 备忘单 英文版
需积分: 1 0 下载量 101 浏览量
2023-08-10
17:40:22
上传
评论
收藏 396KB PDF 举报
温馨提示
试读
2页
github 备忘单 github-git-cheat-sheet
资源推荐
资源详情
资源评论
Git Cheat Sheet
GitHub for Windows
https://windows.github.com
GitHub for Mac
https://mac.github.com
Git for All Platforms
http://git-scm.com
Git distributions for Linux and POSIX systems are available on
the official Git SCM web site.
Install
Configure tooling
Configure user information for all local repositories
$ git config --global color.ui auto
Enables helpful colorization of command line output
$ git config --global user.email "[email address]"
Sets the email you want attached to your commit transactions
$ git config --global user.name "[name]"
Sets the name you want attached to your commit transactions
$ git clone [url]
Clone (download) a repository that already exists on
GitHub, including all of the files, branches, and commits
Create repositories
When starting out with a new repository, you only need to do it
once; either locally, then push to GitHub, or by cloning an
existing repository.
$ git init
Turn an existing directory into a git repository
$ git pull
Updates your current local working branch with all new
commits from the corresponding remote branch on GitHub.
git pull is a combination of git fetch and git merge
Synchronize changesSynchronize changes
Synchronize your local repository with the remote repository
on GitHub.com
$ git push
Uploads all local branch commits to GitHub
$ git merge
Combines remote tracking branch into current local branch
$ git fetch
Downloads all history from the remote tracking branches
$ git branch -d [branch-name]
Deletes the specified branch
$ git merge [branch]
Combines the specified branch’s history into the
current branch. This is usually done in pull requests,
but is an important Git operation.
$ git checkout [branch-name]
Switches to the specified branch and updates the
working directory
Branches
Branches are an important part of working with Git. Any
commits you make will be made on the branch you're currently
“checked out” to. Use
git status to see which branch that is.
$ git branch [branch-name]
Creates a new branch
The .gitignore file
Sometimes it may be a good idea to exclude files from being
tracked with Git. This is typically done in a special file named
.gitignore . You can find helpful templates for .gitignore
files at github.com/github/gitignore.
Git is the open source distributed version control system that facilitates GitHub activities on
your laptop or desktop. This cheat sheet summarizes commonly used Git command line
instructions for quick reference.
资源评论
coding-cat
- 粉丝: 384
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功