I have my personal git repo name myrepo
. I have fetched somerepo
using git clone
and now I want to make it an integral-part of myrepo
. I am thinking of doing it as following.
- Inside
myrepo
tree,git clone <somerepo>
. - Remove all git-related files and directories from
somerepo
such as.git
.gitignore
etc. - Add all files in fetched
somerepo
and commit.
Is there any command which clones only 'raw' data of a git-repo (ignore git-related files)? Better still, is there a command (or may be more than one) which can do these three steps.
I have read about git submodule
a bit. Can submodule
be used? Assume that I don't have any interest in future-modification in somerepo
.