Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Improvement - merge snippets instead of overwrite #57

Open
brpaz opened this issue Oct 5, 2017 · 2 comments
Open

Sync Improvement - merge snippets instead of overwrite #57

brpaz opened this issue Oct 5, 2017 · 2 comments

Comments

@brpaz
Copy link

brpaz commented Oct 5, 2017

Hi.
First of all, congratulations for building this tool I am using it everyday.

I added lots of snippets in the last days, and today I decided to run pet sync in order to synchronize to my snippets gist. But I didn´t specify the -u flag, so it downloaded the contents of the gist file and replaced all my newly created snippets! fortunately I had a backup. I was not aware of this behavior. I think sync should merge the contents of local and remote files and not replacing them like this. The current behavior is more of a backup, than a sync really. It I have pet running of two machines and add snippets In both of then, there is no way to sync automatically without losing data.

Hope this can be improved.

Keep up the good work!

@kpron
Copy link

kpron commented Jan 30, 2018

+1

@knqyf263
Copy link
Owner

@brpaz I'm sorry for the too late reply!
I released v0.3.0.
https://github.com/knqyf263/pet/releases/tag/v0.3.0

I changed the behavior of pet sync.
pet sync compares the local file and gist with the update date and download or upload automatically.
So -u option is deprecated.
Please see https://github.com/knqyf263/pet#sync

In addition, auto_sync is added.
https://github.com/knqyf263/pet#auto-sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants