how to git commit a whole folder?

git

Solution

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"

Problem

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 folder_name git commit folder_name -m "commit operation" ``` I will see the messages nothing added to commit but untracked files present (use "git add" to track)

Original source