0

I have a work space with 20 projects; any changes made to code are visible in the GIT sidebar with an 'M'. However, changes made to code in three project folders at the bottom of the work space (but included in the work space) do not show an 'M' and seem to be excluded from GIT version control.

Any hints on how to fix this?

[edit 1] I am new to GIT (and VSCode); I have started a few projects on a dedicated drive D: on Windows 10, before I moved to Linux Mint a few months ago. I went through the projects (on Linux) to make sure I have all required libraries, and all code compiles. The project work space sits on that (shared) D: drive, also accessible in Linux; I added the the three projects on Linux (but opened that workspace created under Windows). The three projects (not 'managed/noted' by Git) are listed in that work space.

So...

git check-ignore

resulted in this:

fatal: Not a git repository (or any parent up to mount point /media/maxg/Data SSD)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

... which sort of seems to imply to me, there is a related Git directory, which may have been created under my Windows user account; which is not reflected in /home/maxg/.git I did a git init, which created the .git directory, but there is nothing (project related) in it.

However, this being the case, why are the 20 odd projects monitored and the three new ones are not?

MaxG
  • 187
  • 3
  • 11
  • 1
    Use `git check-ignore` to find out whether and why git ignores the files? – matt Apr 19 '20 at 12:04
  • I updated my post with [edit 1] to further clarify... – MaxG Apr 19 '20 at 23:26
  • 1
    Any folder that is (or potentially might be) under git's purview would have a `.git` folder in it (invisible). It sounds like you don't know which of your folders is the one that does. – matt Apr 19 '20 at 23:50
  • Based on your feedback I checked; and the three folders not version-controlled, they do not have a .git directory. If may ask, how do I get projects included (to be version-controlled)? – MaxG Apr 20 '20 at 01:28
  • Right but what about the others? How do you explain that git sees them? You need to know where all the git folders are, all the way up the hierarchy. Does the folder that contains these folders have a git folder? And so on. – matt Apr 20 '20 at 01:52
  • I have no idea, other than that the twenty folders were created in Windows with Git installed. Then I moved to Linux created the three folders without Git installed. Then installed Git. How can I tell Git to take care of these folders too? – MaxG Apr 20 '20 at 06:28

1 Answers1

0

Solution

I figured it out... I used the terminal in VSCode and did a

git init

in each of these three project folders; this marked the folders green, as in 'U'pdated... and they are now part of the fold :)

MaxG
  • 187
  • 3
  • 11
  • Well no, each is part of its own individual fold. You now have 3 separate git repositories. Maybe 23. You do not have 23 sheep in one fold; you have 23 folds each containing one sheep. That’s fine if it’s what you wanted but that’s not clear from the question. – matt Apr 20 '20 at 07:43