rm

gir rm –cached FILE
当我们需要删除暂存区或分支上的文件, 但本地又需要使用, 只是不希望这个文件被版本控制, 可以使用
git rm –cached file_path
git commit -m ‘delete remote somefile’
git push

remote tags

git ls-remote –tags 查看远程库的tag列表 .

blame

git blame //查看一个文件的每一行是哪个commit的修改

reflog

git reflog 可以查看本志刚刚(因reset或删除分支)丢掉的commit

remote branch

git branch -r //查看本地branch对应的远程branch

Git提交到多个远程仓库

git remote set-url –add REMOTE

git push –all
记住不要忘记–all参数,如果不加–all,则无法推送

show

git show –name-only //只显示变更的文件名,文件内容变更不显示