Reputation: 11651
I want simply add a new File or Folder to an existing Repo in my Eclipse.
I tried the following (add index on the file and folder), but nothing happens.
Can someone help me.
Upvotes: 3
Views: 7757
Reputation: 34137
In Git, a new file must first be added to the index (also called staging area) and then committed before the file becomes part of the history:
Result: In the History view a new commit containing the files is shown.
Please note in Git (in contrast to e.g. SVN) only files, but not empty folders can be committed.
Upvotes: 3
Reputation: 1323183
Check the properties on that folder to get its path.
Switch to command line, and do a git status
(if you have Git installed), to check if the folder and its content is actually in a Git repo (or if only "src
" is):
Chec at least if you see a .git
folder above the folder you want to add to the index, you should be able to do so from Eclipse.
But if not, that would explain why adding it does nothing.
Upvotes: 0