Git常用语句|Git command tutorial

创建Git仓库

git init

如果想删除Git仓库(比如在错误的文件夹下创建了Git)

rm -rf .git

检查Git状态(Checking your Git repository status)

git status

添加文件到Git repository,也可以把后面的点换成具体的文件(To add files to the staging area of your Git repository)

git add .

撤销add(undo add)

git reset <file>
git reset

提交内容到Git仓库(commit the current staging area to your Git repository)

git commit -m "first commit"

查看commit的历史记录

git log
git log --oneline

添加online Git repository

git remote add origin <repository URL>

将本地的更新Push到online Git repository(注意原先主分支叫master,现在变成了main)

git push -u origin main

克隆online repository

git clone <repository URL>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值