git 常见命令

查看远程仓库

1
git remote -v

1
2
3
git config core.ignorecase false
查看操作记录
git reflog

大小写敏感

1
git config core.ignorecase false

删除新的 gitignore 文件

1
git rm -rf --cached .env

撤销本地 commit

1
git reset HEAD~

git修改远程仓库地址

  1. 修改命令

    1
    2
    git remote rm origin // 可以省略
    git remote set-url origin [url]
  2. 直接修改config文件