Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

To easily check if a .gitignore is responsible, simply do (with a recent version of git):

git check-ignore -v -- path/to/ScriptableObjects/ 
git check-ignore -v -- path/to/ScriptableObjects/aNewFile 

That will display the right .gitignore (or .git/info/exclude) with the rule excluding that folder and its content.

Typically, an ignored file can still be added with a force (-f):

git add -f /path/to/ignored/file

In the OP's case:

C:\Users\a\OneDrive\Documents\gitignore_global.txt

Check your global config, as I mentioned before hereglobal config, as I mentioned before here.


The other possibility is that the folder and its files are part of a nested git repo, or a submodule.
Look for:

  • either a .git folder within your main repo
  • or a .gitmodules file in your main repo.

To easily check if a .gitignore is responsible, simply do (with a recent version of git):

git check-ignore -v -- path/to/ScriptableObjects/ 
git check-ignore -v -- path/to/ScriptableObjects/aNewFile 

That will display the right .gitignore (or .git/info/exclude) with the rule excluding that folder and its content.

Typically, an ignored file can still be added with a force (-f):

git add -f /path/to/ignored/file

In the OP's case:

C:\Users\a\OneDrive\Documents\gitignore_global.txt

Check your global config, as I mentioned before here.


The other possibility is that the folder and its files are part of a nested git repo, or a submodule.
Look for:

  • either a .git folder within your main repo
  • or a .gitmodules file in your main repo.

To easily check if a .gitignore is responsible, simply do (with a recent version of git):

git check-ignore -v -- path/to/ScriptableObjects/ 
git check-ignore -v -- path/to/ScriptableObjects/aNewFile 

That will display the right .gitignore (or .git/info/exclude) with the rule excluding that folder and its content.

Typically, an ignored file can still be added with a force (-f):

git add -f /path/to/ignored/file

In the OP's case:

C:\Users\a\OneDrive\Documents\gitignore_global.txt

Check your global config, as I mentioned before here.


The other possibility is that the folder and its files are part of a nested git repo, or a submodule.
Look for:

  • either a .git folder within your main repo
  • or a .gitmodules file in your main repo.
add global link
Source Link
VonC
  • 1.3m
  • 547
  • 4.6k
  • 5.5k

To easily check if a .gitignore is responsible, simply do (with a recent version of git):

git check-ignore -v -- path/to/ScriptableObjects/ 
git check-ignore -v -- path/to/ScriptableObjects/aNewFile 

That will display the right .gitignore (or .git/info/exclude) with the rule excluding that folder and its content.

Typically, an ignored file can still be added with a force (-f):

git add -f /path/to/ignored/file

In the OP's case:

C:\Users\a\OneDrive\Documents\gitignore_global.txt

Check your global config, as I mentioned before here.


The other possibility is that the folder and its files are part of a nested git repo, or a submodule.
Look for:

  • either a .git folder within your main repo
  • or a .gitmodules file in your main repo.

To easily check if a .gitignore is responsible, simply do (with a recent version of git):

git check-ignore -v -- path/to/ScriptableObjects/ 
git check-ignore -v -- path/to/ScriptableObjects/aNewFile 

That will display the right .gitignore (or .git/info/exclude) with the rule excluding that folder and its content.

Typically, an ignored file can still be added with a force (-f):

git add -f /path/to/ignored/file

The other possibility is that the folder and its files are part of a nested git repo, or a submodule.
Look for:

  • either a .git folder within your main repo
  • or a .gitmodules file in your main repo.

To easily check if a .gitignore is responsible, simply do (with a recent version of git):

git check-ignore -v -- path/to/ScriptableObjects/ 
git check-ignore -v -- path/to/ScriptableObjects/aNewFile 

That will display the right .gitignore (or .git/info/exclude) with the rule excluding that folder and its content.

Typically, an ignored file can still be added with a force (-f):

git add -f /path/to/ignored/file

In the OP's case:

C:\Users\a\OneDrive\Documents\gitignore_global.txt

Check your global config, as I mentioned before here.


The other possibility is that the folder and its files are part of a nested git repo, or a submodule.
Look for:

  • either a .git folder within your main repo
  • or a .gitmodules file in your main repo.
add force
Source Link
VonC
  • 1.3m
  • 547
  • 4.6k
  • 5.5k

To easily check if a .gitignore is responsible, simply do (with a recent version of git):

git check-ignore -v -- path/to/ScriptableObjects/ 
git check-ignore -v -- path/to/ScriptableObjects/aNewFile 

That will display the right .gitignore (or .git/info/exclude) with the rule excluding that folder and its content.

Typically, an ignored file can still be added with a force (-f):

git add -f /path/to/ignored/file

The other possibility is that the folder and its files are part of a nested git repo, or a submodule.
Look for:

  • either a .git folder within your main repo
  • or a .gitmodules file in your main repo.

To easily check if a .gitignore is responsible, simply do (with a recent version of git):

git check-ignore -v -- path/to/ScriptableObjects/ 
git check-ignore -v -- path/to/ScriptableObjects/aNewFile 

That will display the right .gitignore (or .git/info/exclude) with the rule excluding that folder and its content.

The other possibility is that the folder and its files are part of a nested git repo, or a submodule.
Look for:

  • either a .git folder within your main repo
  • or a .gitmodules file in your main repo.

To easily check if a .gitignore is responsible, simply do (with a recent version of git):

git check-ignore -v -- path/to/ScriptableObjects/ 
git check-ignore -v -- path/to/ScriptableObjects/aNewFile 

That will display the right .gitignore (or .git/info/exclude) with the rule excluding that folder and its content.

Typically, an ignored file can still be added with a force (-f):

git add -f /path/to/ignored/file

The other possibility is that the folder and its files are part of a nested git repo, or a submodule.
Look for:

  • either a .git folder within your main repo
  • or a .gitmodules file in your main repo.
Source Link
VonC
  • 1.3m
  • 547
  • 4.6k
  • 5.5k
Loading