1、首先,要clone项目代码:

git clone 链接地址

2、更新代码:

git pull

3、添加修改过的文件、文件夹:

git add 修改过的文件,文件夹

4、提交并注释:

git commit -m '提交注释'

5、上传:

git push

 

其它常用命令:

1.查看状态:

git status

2.查看修改内容

git diff

3.查看日志

git log

4.撤回修改内容

git checkout -- 文件名

5.删除文件

git rm 文件名

6.忽略某个文件或文件夹 (例如在根目录里面的css文件夹里面的index2.css,可以这样写:git update-index --assume-unchanged css/index2.css)

git update-index --assume-unchanged   要忽略的文件夹/文件夹下文件名

 

相关文章:

  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2022-12-23
  • 2021-09-27
  • 2022-01-18
猜你喜欢
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-11-29
相关资源
相似解决方案