Issue
I have created a git repository for my dot files, but when I've used git init at my home directory, it seems it is considering all the subdirectories as part of the git as well. I've added the repository via git add remote. The problem is that my bash shows in which branch I actually am, e.g., user at userr in folder on branch. Therefore, when I go to my Desktop (~/Desktop), it is still considered a git directory, I can even use git status there. However, I would like to git consider only the home directory for the repository.
Solution
I think I found the solution from this thread : Git ignore sub folders @mgold 's answer . he is suggesting to add
*/*
to gitignore. It worked for me in windows if you are using a linux based system you might need to alter the regex . I hope this helps.
Answered By - Ajay Answer Checked By - Mary Flores (WPSolving Volunteer)