Reputation: 8052
This question shows how to use .gitignore
to ignore various locations of bin
folder inside your project. I've tried the same but with .git
folder. I've put .git/
inside my .gitignore
then run git init
and then git add .
but with no luck. Git still complains about adding another repo inside current repo. My goal is to create one big repo which will contain multiple other repos (I do not need their git history, just files). I know about best practices and git modules etc. I'm just curious why it does not works with .git/
but it works with bin/
EDIT
I' do not know what I did wrong at the time of writing this post but now it seems that it is working. I have empty .gitignore
and if I issue git status
there is no mention about .git
folders. This also confirms git ls-files
(which I've issued after git add .
and git commit
). But if I rename those .git
folders e.g. to .git.tmp
then git status
start to "see" them. This behavior is also described in this post. My git version is 2.25.1
Upvotes: 0
Views: 876