zzh--blog

git 命令集

1 :修改 git 提交账号
打开git的命令控制窗口
(1)#此命令会列出所有GIT当时能找到的配置
git config --list
(2)#修改git提交的email
git config --global user.email test@test.com
(3)#修改提交的git的user.name
git config --global user.name test


2 :git 常用
  git pull :  拉取代码

  git status : 查看当前修改状态
  git commit -m "xx" : 部分提交 
  git commit -am "xx" : 全部提交

  git push : 上传代码
  git reset --hard : 撤销本次修改
  git reset --hard  xx :回退到xx的提交
  git checkout xx : 撤销xx文件的修改
  

  git commit --amend : 可用来修改提交未push的内容,
  git reset HEAD xx : 取消已暂存但未提交的文件,恢复暂存前状态

  git remote : 查看远程仓库
  git remote -v (--verbose 简写) : 查看项目地址

 

3 :git 详解 
  引用自 : https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000

 

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2021-10-16
  • 2021-11-01
  • 2021-11-28
  • 2022-01-29
  • 2021-08-12
  • 2022-02-19
猜你喜欢
  • 2021-07-24
  • 2022-12-23
  • 2022-02-26
  • 2021-12-13
  • 2021-11-01
  • 2021-11-01
  • 2022-02-28
相关资源
相似解决方案