gir rm –cached FILE
当我们需要删除暂存区或分支上的文件, 但本地又需要使用, 只是不希望这个文件被版本控制, 可以使用
git rm –cached file_path
git commit -m ‘delete remote somefile’
git push
git ls-remote –tags 查看远程库的tag列表 .
git blame //查看一个文件的每一行是哪个commit的修改
git reflog 可以查看本志刚刚(因reset或删除分支)丢掉的commit
git branch -r //查看本地branch对应的远程branch
git remote set-url –add REMOTE
git push
记住不要忘记–all参数,如果不加–all,则无法推送
git show –name-only //只显示变更的文件名,文件内容变更不显示