1

I recently installed VS code on Ubuntu, and when trying to set up Git, I realized that all changes to my files are registered as changes in a Git repository, leading to me having to commit any changes to any file that is augmented on my device, such as cache files from Google Chrome.

This leads to over 3371 commits that I have to accept every time I open another document and files that I am actually using get lost in this mush of files.

files versioned

The specific problem is: How can I avoid having to version all my files?
(which is why I see all those "changes" in VSCode Source Control section)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
AJ LaBarca
  • 11
  • 1
  • 2

1 Answers1

2

ahh, I just checked, yes my entire user directory is a get repo.

If you have a ~/.git folder, you should remove it (at at least rename it): there is no good practice recommending to put its entire home folder under version control.
Or you should at least have a .gitignore file properly configured.

But if you did not explicitly setup that Git repository in ~, delete it.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • how do I properly configure the .gitignore file? Sorry I'm completely new to this – AJ LaBarca Jan 24 '19 at 02:37
  • @AJLaBarca The point is: you should not need to configure a .gitignore, because you should not have a .git in your home folder in the first place. Sidenote: on .gitignore, see https://www.gitignore.io/ and https://stackoverflow.com/a/467053/6309. – VonC Jan 24 '19 at 07:33