Git基础命令
git init
git clone + 远程仓库地址
git remote -v
git remote remove origin
git branch
git branch -r
git checkout
git status -s
git add .
git commit -m
git commit --amend 修改提交
git reset --hard 撤销了这些修改
git tag
git tag [tag] 新建
下载远程仓库的所有变动
git fetch [remote]
增加一个新的远程仓库
git remote add [shortname] [url]
git checkout [file]
恢复暂存区的所有文件到工作区
git checkout .
重置暂存区的指定文件,与上一次commit保持一致,但工作区不变
git reset [file]
重置暂存区与工作区,与上一次commit保持一致
git reset --hard
$ git config --global user.name "xxx"
$ git config --global user.email "xxx@gmail.com"