1

I'm trying to add all my files from blog to git but I'm getting this error:

fatal: Not a git repository: myBlog/crayon-syntax-highlighter/js/jquery-colorpicker/../../.git/modules/js/jquery-colorpicker

I'm trying to add all the files like this:

git add --v -A 

Any of you knows why or if there is any work around this?

I'll really appreciate your help

4
  • Do you already have a git repository (i.e. have you cloned one or done a git init)? Commented Mar 18, 2017 at 21:11
  • @adrianbanks : Yes, I did the git init and I can add any file with the exception of that directory Commented Mar 18, 2017 at 21:12
  • It might be because of the .git directory further down your path. Do you have a .git directory inside your crayon-syntax-highlighter directory? Commented Mar 18, 2017 at 21:15
  • @adrianbanks that is a wordpress plugging I didn't add that .git in that directory Commented Mar 18, 2017 at 21:22

1 Answer 1

1

Apparently:

  • myBlog/crayon-syntax-highlighter/ is a git repo (it has a .git in it)
  • that git repo has declared a git submodule whose path should be js/jquery-colorpicker

If you don't have a myBlog/crayon-syntax-highlighter/.gitmodules file, then you can simply remove that declaration (rm -Rf .git/modules) in order to add all files then.

If you did not add a .git in that folder, but simply whish to add its files (without keeping its files history), then delete the .git entirely: you will then be able to git add -A everything.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.