I have spent some time chasing the wild goose (well - the .gitignore
file) after getting:
$> git-submodule add --name fcx-1 ./fcx-1/ ./fcx-1/
The following path is ignored by one of your .gitignore files:
fcx-1
Use -f if you really want to add it.
long story short -- the culprit is this piece of code in git-submodule:
if test -z "$force" && ! git add --dry-run --ignore-missing "$sm_path" >
/dev/null 2>&1
then
eval_gettextln "The following path is ignored by one of your .gitignore
files:
\$sm_path
Use -f if you really want to add it." >&2
exit 1
fi
so if anything goes wrong in git add, it just reports this error
message.
FTR -- actual problem in my case was:
$> git add --dry-run --ignore-missing fcx-1
fatal: Unable to create
'/mnt/datasets/datalad/crawl/crcns/.git/index.lock': File exists.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
;-)
Cheers!
P.S. Please CC me in replies
--
Yaroslav O. Halchenko
Center for Open Neuroscience http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik