Visual studio code: automatic commit git
Many times, I forget to commit my edits to my git. And if I closed VSCode, I can't use ctrl-Z anymore.
Because, I have git set up, I thought I could use something like an automatic commit every 30sec or so.
I have seen this extension btu ti's not open source, so I don't want to use it. I also found this but my programming skills aren't good enough to implement it.
I also wonder if using git in this way is a good option, as the git folder may get really heavy quickly (my git is only local, so I can handle a couple of gigab)
So what is the best way to achieve what I want to do?
git visual-studio-code backup revision-history
add a comment |
Many times, I forget to commit my edits to my git. And if I closed VSCode, I can't use ctrl-Z anymore.
Because, I have git set up, I thought I could use something like an automatic commit every 30sec or so.
I have seen this extension btu ti's not open source, so I don't want to use it. I also found this but my programming skills aren't good enough to implement it.
I also wonder if using git in this way is a good option, as the git folder may get really heavy quickly (my git is only local, so I can handle a couple of gigab)
So what is the best way to achieve what I want to do?
git visual-studio-code backup revision-history
add a comment |
Many times, I forget to commit my edits to my git. And if I closed VSCode, I can't use ctrl-Z anymore.
Because, I have git set up, I thought I could use something like an automatic commit every 30sec or so.
I have seen this extension btu ti's not open source, so I don't want to use it. I also found this but my programming skills aren't good enough to implement it.
I also wonder if using git in this way is a good option, as the git folder may get really heavy quickly (my git is only local, so I can handle a couple of gigab)
So what is the best way to achieve what I want to do?
git visual-studio-code backup revision-history
Many times, I forget to commit my edits to my git. And if I closed VSCode, I can't use ctrl-Z anymore.
Because, I have git set up, I thought I could use something like an automatic commit every 30sec or so.
I have seen this extension btu ti's not open source, so I don't want to use it. I also found this but my programming skills aren't good enough to implement it.
I also wonder if using git in this way is a good option, as the git folder may get really heavy quickly (my git is only local, so I can handle a couple of gigab)
So what is the best way to achieve what I want to do?
git visual-studio-code backup revision-history
git visual-studio-code backup revision-history
asked Dec 28 '18 at 9:24
MagTunMagTun
1,87822440
1,87822440
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I also wonder if using git in this way is a good option
No, that would pollute the history of your commits.
Using the extension "Local history" is a better approach, and does not rely on your VCS.
(and is open-source: github.com/zabel-xyz/local-history)
Every time you modify a file, a copy of the old contents is kept in the local history.
At any time, you can compare a file with any older version from the history.
It can help you out when you change or delete a file by accident.
The history can also help you out when your workspace has a catastrophic problem.
Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the.saveDelay
but it only works on save
– MagTun
Dec 28 '18 at 10:15
1
@MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
– VonC
Dec 28 '18 at 16:09
add a comment |
I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.
Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.
New contributor
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53956236%2fvisual-studio-code-automatic-commit-git%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I also wonder if using git in this way is a good option
No, that would pollute the history of your commits.
Using the extension "Local history" is a better approach, and does not rely on your VCS.
(and is open-source: github.com/zabel-xyz/local-history)
Every time you modify a file, a copy of the old contents is kept in the local history.
At any time, you can compare a file with any older version from the history.
It can help you out when you change or delete a file by accident.
The history can also help you out when your workspace has a catastrophic problem.
Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the.saveDelay
but it only works on save
– MagTun
Dec 28 '18 at 10:15
1
@MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
– VonC
Dec 28 '18 at 16:09
add a comment |
I also wonder if using git in this way is a good option
No, that would pollute the history of your commits.
Using the extension "Local history" is a better approach, and does not rely on your VCS.
(and is open-source: github.com/zabel-xyz/local-history)
Every time you modify a file, a copy of the old contents is kept in the local history.
At any time, you can compare a file with any older version from the history.
It can help you out when you change or delete a file by accident.
The history can also help you out when your workspace has a catastrophic problem.
Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the.saveDelay
but it only works on save
– MagTun
Dec 28 '18 at 10:15
1
@MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
– VonC
Dec 28 '18 at 16:09
add a comment |
I also wonder if using git in this way is a good option
No, that would pollute the history of your commits.
Using the extension "Local history" is a better approach, and does not rely on your VCS.
(and is open-source: github.com/zabel-xyz/local-history)
Every time you modify a file, a copy of the old contents is kept in the local history.
At any time, you can compare a file with any older version from the history.
It can help you out when you change or delete a file by accident.
The history can also help you out when your workspace has a catastrophic problem.
I also wonder if using git in this way is a good option
No, that would pollute the history of your commits.
Using the extension "Local history" is a better approach, and does not rely on your VCS.
(and is open-source: github.com/zabel-xyz/local-history)
Every time you modify a file, a copy of the old contents is kept in the local history.
At any time, you can compare a file with any older version from the history.
It can help you out when you change or delete a file by accident.
The history can also help you out when your workspace has a catastrophic problem.
answered Dec 28 '18 at 9:31
VonCVonC
832k29026223162
832k29026223162
Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the.saveDelay
but it only works on save
– MagTun
Dec 28 '18 at 10:15
1
@MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
– VonC
Dec 28 '18 at 16:09
add a comment |
Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the.saveDelay
but it only works on save
– MagTun
Dec 28 '18 at 10:15
1
@MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
– VonC
Dec 28 '18 at 16:09
Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the
.saveDelay
but it only works on save– MagTun
Dec 28 '18 at 10:15
Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the
.saveDelay
but it only works on save– MagTun
Dec 28 '18 at 10:15
1
1
@MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
– VonC
Dec 28 '18 at 16:09
@MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
– VonC
Dec 28 '18 at 16:09
add a comment |
I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.
Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.
New contributor
add a comment |
I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.
Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.
New contributor
add a comment |
I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.
Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.
New contributor
I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.
Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.
New contributor
edited Jan 3 at 14:43
New contributor
answered Jan 3 at 11:26
RayRay
11
11
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53956236%2fvisual-studio-code-automatic-commit-git%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown