tags:

views:

36

answers:

1

hello

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!

+2  A: 

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.

thenduks
In other words, cloning clones from the _repository_ (that's, eg, the `.git` directory that you can't see) and not from the working directory. The only way to get a file as part of a clone is to have it committed into the repo.
thenduks
In fact it's usually better to do your pulling (in general) from a bare repo and not from one someone is working on anyway (as in, there shouldn't be a working directory at all).
thenduks