I'm quite new to git and I'm facing a (surely) trivial problem.
I have cloned a repository and currently working in one of the subfolders (subdirectories).
The structure is something similar to
Main repository
|-subfolder_1
|--file_a
|--file_b
|-subfolder_2
|-subfolder_3
In the cloned copy, I have created in subfolder_1 a new file file_c. I can correctly add the file, but the problem I have is that when I push the file file_c, it gets updated/committed into the main repository and not in the subfolder subfolder_1, i.e.
Main repository
|-subfolder_1
|--file_a
|--file_b
|-subfolder_2
|-subfolder_3
|-file_c
With the command git remote -v I get the https of the Main repository for push and fetch.
What am I getting wrong? Thanks a lot!
Whenever you clone a git repository, the "root" folder is the most top folder of all your files.
If you wish to add "New git repository" under the root folder you should add submodule.
In your case you clones a repository, all your files will be added under the root (with respect to their relative path).
Example:
lsor with `tree' commandStart reading from bottom up