2

I'm having trouble with git, here it's the problem: I have serval projects which i'm using git, suddenly git stop to keep track of all the new files added to any of the existents projects (scripts, images etc etc), the wired thing it's that git detect all the changes made the existing files of that already are in the project, but when i try to add something new noting will happen.

So far I have:

  1. Checked my git-ingore.
  2. Redownload the projects.

But nothing seams to work. How can I solve the problem?

Max_Power89
  • 1,710
  • 1
  • 21
  • 38

3 Answers3

7

I found the problem. When I try to manually add the file using the command

git add <filename>

I got the following answer:

The following paths are ignored by one of your .gitignore files:

Now since I've checked the git ignore in my folder, I was sure that my .gitignore wasn't ignoring the file. So by running the command:

git check-ignore -v <file name>

I got this:

/Users/Anonymus/.gitignore_global:3:Assets

So it was my gitignore_global fault. I had to change it and I have no clue of how the gitignore_global has been modified/changed.

Max_Power89
  • 1,710
  • 1
  • 21
  • 38
1

You should also check ~/.gitconfig and ~/.gitignore_global, which will change gitignore_global.

gzh
  • 3,507
  • 2
  • 19
  • 23
0

just cut file into another folder, then commit -> push.

after that, bring back the file and git add . -> commit -> push

it work for my case

Tri yulianto
  • 323
  • 2
  • 7