git-plus icon indicating copy to clipboard operation
git-plus copied to clipboard

"The following paths are ignored by one of your .gitignore files" when in a subdirectory of of a folder that has a git repo with ignore of all but one file

Open jcollum opened this issue 8 years ago • 2 comments

[Description of issue here]

Steps to reproduce:

  1. create git repo in root folder
  2. gitignore of that repo:
*
!.bash_profile
  1. create folder called projects/abc
  2. create git ignore in that folder
  3. add some code in a folder like ~/projects/abc/etc/initialize.js
  4. attempt to add and commit with git plus

Result: error message in title of this post.

Expected: it should add and commit the file since git will do that without -f:

$ gs
On branch f/login
Your branch is up-to-date with 'origin/f/login'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	new file:   etc/initializeDb.js

jcollum avatar Apr 03 '17 00:04 jcollum

I'm not sure I understand what you're trying to accomplish. You have made your home directory a git repo and ignored everything but .bash_profile.

According to the steps you've laid out, that error is valid if the /projects/abc is not a git repository. If it is a git repo, then opening it in atom as the root of the project should work fine because atom will understand it as a git repository with it's own .gitignore

akonwi avatar May 12 '17 17:05 akonwi

that error is valid if the /projects/abc is not a git repository

It is.

opening it in atom as the root of the project should work fine because atom will understand it as a git repository with it's own .gitignore

Sure doesn't seem to be.

jcollum avatar May 12 '17 22:05 jcollum