kobus-v-schoor / dotgit

A comprehensive solution to managing your dotfiles
GNU General Public License v2.0
166 stars 12 forks source link

Problems with dotgit. #15

Open AndreaHasani opened 6 years ago

AndreaHasani commented 6 years ago

I don't know if im using it wrong but I keep getting my config files deleted and some other problems.(Good thing I keep them backup). 1- Running dotgit restore most of time deletes the folders which I have specific hostname configs like .i3 and .zshrc. 2- dotgit restore doesn't restore the configs folder even If I get them from my git if they are not on my config folder.For example lets say the .i3 folder is empty and I have .i3/ Configs on my dotgit folder. If I run dotgit restore it doesn't symlink them to ~/.i3/ (is that how its supposed to work).

kobus-v-schoor commented 6 years ago

Hello @AndreaHasani ,

Would you mind posting your filelist for me? Also what commands did you use?

AndreaHasani commented 6 years ago

@kobus-v-schoor I was testing this for some time and found out that if I change a dot file folder on my system and have them different. Dot git can't sync them together for example. I have a wallpaper folder for i3 which set them to background. If both folders have different wallpapers when I set them in common category and try to sync them together dotgit restore will not work. Even if the files are on the folder if I run dotgit restore it will take the local folder and sync it to dotgit folder which has the wallpapers , making it so it deletes them.

kobus-v-schoor commented 6 years ago

Hi @AndreaHasani ,

I'm having trouble understanding your setup - would you mind posting your filelist as well as the directory structure for the files/folder that you are trying to use with dotgit? Your problems sound highly unusual

AndreaHasani commented 6 years ago

I've done some more testing and found out what the problem was.The problem goes like this. If I have a setup like this: --- Filelist .i3

Now if I delete a file in the .i3 folder while they are symlink on dotgit (this is just for the test the point is to restore accidently deleting configs) after that I would run dotgit restore thinking that it would take the file from dotgit folders and symlink it back. So far I think dotgit restore first looks at .i3 folder and see's that xxx symlink is deleted and goes and delete the original file. Even when I restore it doing a git reset --hard it still wouldn't symlink it back.

I think you should add a new option called sync and have that option work like the restore option. And change restore to look first at dotgit folder then symlink back since thats what restore should do at least thats what I think I would get from the name it has.

Also if I may suggest a feature it would be adding support for excluding some files. Thanks