-
git diff
显示仍留在工作目录中且未暂存的变更
-
git diff --cached
显示已经暂存因此有助于下次 commit 的变更
-
git push origin --delete <branch_name>
delete a remote branch
-
git branch -d <branch_name>
delete a local branch
-
git rm --cached mylogfile.log
remove a file from a git repository without deleting it from the local filesystem
-
git rm --cached -r mydirectory
ibid, but for a directory