I'm actually trying to learn how to use git, including the "git submodule" subcommands.
I already set up a server on which I can host, push and pull git repositories by using ssh.
I created on this server a main git repository "Travail" in wich I would like to put all my projects as submodules.
In my Travail repository, I already added a project of mine as a submodule at
git submodule add ssh://XXX.XXX.XXX.XXX:XXXXX/opt/git/fdf.git projets/fdf
A git directory for 'projets/fdf' is found locally with remote(s):
If you want to reuse this local git directory instead of cloning again from
use the '--force' option. If the local git directory is not the correct repo
or you are unsure what this means choose another name with the '--name' option.
path = tools/libft
url = ssh://git@XXX.XXX.XXX.XXX:XXXXX/opt/git/libft.git
You may have deleted your
'projets/fdf' from disk, but your Git repository still has it. Use
git rm -rf projets/fdf to remove it from Git, then commit the changes. After that you'll be able to add this folder as a submodule.