I committed to my github repo using the terminal commands:
git add .
git commit -m
git push raytracer master
It was going well for about 15-20 commits, until I restructured my code and deleted about 2-3 header files and combined them into one. Now when I do the same commands, it yells at me and I’m guessing its because it’s expecting files that I deleted after the restructuring.
What are the proper commands for me to successfully commit my local repo to github?
If you deleted some files manually (not using
git rm) git is not going to be happy. But, fear not, it is easy to fix.Use
git statusand see which files git is missing. If you really want them gone, you need to tell git by usinggit rm <files_or_dirs_to_remove>. You may need to type full file name of deleted file (not using wildcards like *), and may need to add-fswitch to force git to remove it from index (actually, add remove intent to index).After that, you should be able to
git commityour changes. Good luck!