Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git commit all files

Tags:

git

git-svn


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

like image 659
Dodjs Avatar asked Dec 31 '10 16:12

Dodjs


People also ask

How do I commit all files in git?

Enter git add --all at the command line prompt in your local project directory to add the files or changes to the repository. Enter git status to see the changes to be committed. Enter git commit -m '<commit_message>' at the command line to commit new files/changes to the local repository.

Can you git commit multiple files?

1 Answer. You can add all the files using the git add command like below for all the files you want to add, which will add all your files to the staging area, which means the files are ready to be committed. Now commit your files, the editions or addition made in the files will now be saved.


2 Answers

git add .
git commit -a

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

like image 91
jondavidjohn Avatar answered Sep 30 '22 19:09

jondavidjohn


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.

like image 30
Jo Liss Avatar answered Sep 30 '22 19:09

Jo Liss