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

autoSave makes you write a commit message every time there's a change #14

Open
jx22 opened this issue Sep 29, 2016 · 4 comments
Open

autoSave makes you write a commit message every time there's a change #14

jx22 opened this issue Sep 29, 2016 · 4 comments

Comments

@jx22
Copy link

jx22 commented Sep 29, 2016

This is very cool software. I love VS Code and now it's available on a Chromebook, which I have wanted for a while. I usually like to use the autoSave setting, but when I tried to set that up in Workspace Settings in Code I kept being nudged to write a commit message for every little change. So I disabled the setting. It'd be cool if there were a workaround such that you wouldn't have to put in a commit message for every change (my use case is writing in Markdown). Then again this may be a basic architectural requirement of Git.... In any case, thanks!

@hashhar
Copy link

hashhar commented Dec 30, 2016

I think a way to get around this could be use a private gist as a scratch buffer.

I propose the following:

  1. Create a private gist which is a exact copy of the file (or empty if it is a new file).
  2. AutoSave changes to the file to the gist using a default commit message like AutoSave: Save number <counter>.
  3. When the user explicitly hits Save (or even better if you could add a command called Commit which is available only when autosave is turned on) the data from the gist is committed to the repository.

The Commit command can be removed if autoSave is not enabled.

@scottlu
Copy link
Member

scottlu commented Dec 31, 2016

This is a workable solution. It would be a great addition if you're interested in adding it. There is code already in GHEdit for reading/writing to gists (currently used for user settings and keyboard bindings). The code recognizes paths like this: /$gist/gist-title/filename and supports general reading and writing to them.

@hashhar
Copy link

hashhar commented Dec 31, 2016

@scottlu I'll definitely try working on it next week and let you all know of the progress.

@hashhar
Copy link

hashhar commented Jan 4, 2017

I feel lost. I couldn't figure out how this works. I just want to let you know that I'm not working on it at the moment.

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