Miyazaki Miyazaki - 2 months ago 6
Git Question

how to git commit a whole folder?

Here is a folder, which contains a lot of .java files.

How can I git commit this folder ?

If I do the following commands

git add foldername
git commit foldername -m "commit operation"

I will see the messages
nothing added to commit but untracked fils present (use "git add" to track)


You don't "commit the folder" - you add the folder, as you have done, and then simply commit all changes. The command should be:

git add foldername
git commit -m "commit operation"