git clone git@10.0.0.xxx:/xxx/xxx/xxx.gitgit fetchgit pullgit add -Agit commit -m "说明"git pushgit checkout 具体路径 (直接删除之前记录,从新开始)git checkout -- 具体路径 (用来恢复本地误删操错)git statusgit diffgit reset --hard 路径 用远程文件覆盖本地文件
或者先fetch一下,然后 git reset --hard origin/master
The following untracked working tree files would be overwritten by merge 出现的解决办法就是cleanup:git clean -d -fx
关于过滤列表.gitignore文件:
.gitignore只适用于尚未添加到git库的文件。如果已经添加了,则需用git rm移除后再重新commit。
转载于:https://www.cnblogs.com/JD85/p/4708168.html
相关资源:JAVA上百实例源码以及开源项目