Search code examples
gitclone

how to ignore .gitignore action when cloning?


I wanna to ignore .gitignore action when cloning ?

for example)

Repository has following files.

A.txt B.o .gitignore <- .gitignore defines *.o

So my local repository has only A.txt when cloning.

But I want to have A.txt B.o .gitignore when cloning.

Thank you thenducks!


Solution

  • Cloning has nothing to do with .gitignore, the reason those files aren't being cloned is most likely that... well... they're ignored! So if you want B.o in the repo (and as a result, in clones) then simply add that file to the repo with git add -f B.o and commit it.