Is it a bad idea to push everything in my home folder to a private repo on GitHub?

by ThatDataGuy   Last Updated August 13, 2019 21:02 PM

And if so, why?

I have two ubuntu 18.04 machines that I use for work. One at home and one in the office. I use git and github a lot already. I make configuration changes to files in my home directory often (eg, .pgpass file for postgres etc) and I want those changes replicated between the machines, without me having to remember to explicitly sync them when I leave each one. Using source control makes sense to me, as I want to be able to rewind changes if I mess something up.

However, I'm worried that if I set up a process to sync everything in my home folder, I might accidentally push files that I shouldn't (eg passwords). I know that I can tell git to ignore everything except the files I explicitly tell it to stage, but then I would lose the option of having it automatically sync everything. Is there a simple git ignore file pattern that would suit my needs?

I would rather not set up a private repo server as I then have to worry about keeping it running.

Related Questions

How can I sync my home folder "both ways" using rsync

Updated February 21, 2017 17:02 PM

How to customize Nautilus to display directory tree?

Updated November 23, 2017 12:02 PM