Git commit all files

六眼飞鱼酱① 提交于 2019-12-19 03:46:30

问题



How can I commit the full project again? (I want upload all of my file upload again to heroku)


回答1:


git add .
git commit -a

not completely sure what you want, but to add all files and commit all changes, use this




回答2:


I want readd all files, because I think my git slug is corrupted

I'm not sure what you mean by corrupted -- Git uses SHA1 hashes, and it's very very hard for things to break.

You could do find | xargs touch just in case your mtimes got messed up, but after that, git status will show you reliably if your working copy matches the repo (minus anything listed in .gitignore). Generating a new commit without any changes (which is what you seem to be asking for), as with git commit --allow-empty, is verifiably going to get you the same tree and won't solve your problem.

So I think you'll have to bite the bullet and spend some time tracking down where exactly the corruption happened (track down broken files, see which commit changed them, etc.). It's most likely not Git's fault.



来源:https://stackoverflow.com/questions/4571106/git-commit-all-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!