跳至正文

Git使用教程(5)-Git常用命令

克隆仓库到本地

git clone git://xxx.git

新增文件加入仓库

git add .

代码提交本地

git commit -a -m "add code"

其中 add code 是本次提交的注释

更新master分支

git pull origin master

推送master分支到服务器

git push origin master

更新仓库状态

git fetch

重置代码到当前版本

git reset --hard

标签:

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注