GIT CHEAT SHEET GIT作弊表

GIT CHEAT SHEET GIT作弊表

CREATE 创建

Clone an existing repository

复制一个存在的仓库

$ git clone ssh://user@domain.com/repo.git


使用ssh协议生成密钥

ssh-keygen -t rsa -C "<your email address>"
cd ~/.ssh
subl id_rsa.pub

Create a new local repository

创建一个新的本地仓库

$ git init

设置用户名和邮箱

$ git config --global user.name "<user name>"
$ git config --global user.email <email for github>

LOCAL CHANGES 本地库修改

Changed files in your working directory

查看工作目录下文件的修改状态

$ git status

Changes to tracked files

查看文件的修改情况

$ git diff

Add all current changes to the next commit

添加文件

$ git add <file> #(添加文件)

Add some changes in to the next commit

提交文件

$ git commit -m "<message>"  #(提交文件)

-m: add commit messege

Commit all local changes in tracked files

添加所有更改到提交序列

$ git add .

Commit previously staged changes

对文件添加一些修改并发送到提交序列。 [wait-for][?]

$ git add -p <file>

Commit all local changes in tracked files

提交更改(所有文件?)

$ git commit -a

Commit previously staged changes

提交更改(前边的文件)

$ git commit
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值