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

Add git autopush option when committing (revisited) #62058

Closed
addisonElliott opened this issue Oct 29, 2018 · 4 comments
Closed

Add git autopush option when committing (revisited) #62058

addisonElliott opened this issue Oct 29, 2018 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality git GIT issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@addisonElliott
Copy link

Hello,

This issue has been submitted and closed once two years ago but I wanted to revisit it and defend why I think it should be included.

Original Issue: #14885

To summarize what was said in the original issue, I think there should be an option in VS Code to allow for automatic pushing after committing without having to manually click manually on the bottom buttons.

The original issue author suggested something like this which I liked:

{
    // Automatically perform a git push after a commit
    "git.autoPush": true
}

@joaomoreno said the following in the issue which justified why it was closed:

Yeah... I'd absolutely recommend the post-commit hook, it is by far the best option. It comes with the added benefit that if you ever commit from the command line outside of VS Code, you'll still benefit from the automatic push.

Another reason:

That's also the same for auto push. You may just want to push current branch to remote always so it's a single line of script in post-commit hook file. For this particular request, a autoPush is enough. But some users may want to do a rebase before they push to remote, or they may not want to have the same name in their remote, it makes the post-commit a little bit complicated but you can always to that. But a auto-push no longer works in these cases.

As for my reasoning, this is a feature in PyCharm which is the IDE I use frequently. In my opinion, anytime I commit I'll usually push along with it because I want to have those changes on GitHub in case I switch machines.

Additionally, I don't want to have to create a new Git hook whenever I create a new repository, because I find myself frequently cloning and creating new Python projects.

In my opinion, I think this is a basic feature that would be nice to have and I don't know how many people would need anything special besides typical commit & push.

@vscodebot
Copy link

vscodebot bot commented Oct 29, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the git GIT issues label Oct 29, 2018
@joaomoreno joaomoreno added the feature-request Request for new features or functionality label Oct 29, 2018
@joaomoreno joaomoreno added this to the Backlog milestone Oct 29, 2018
@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Oct 29, 2018
@joaomoreno joaomoreno removed their assignment Oct 29, 2018
@defaults
Copy link

@joaomoreno would like to pick this up.

@laphets
Copy link
Contributor

laphets commented Nov 11, 2018

@defaults Have you been working on this already? If not, maybe I can pick it up.

@joaomoreno joaomoreno modified the milestones: Backlog, November 2018 Nov 13, 2018
@joaomoreno joaomoreno removed the help wanted Issues identified as good community contribution opportunities label Nov 13, 2018
@joaomoreno joaomoreno self-assigned this Nov 13, 2018
@joaomoreno
Copy link
Member

A new git.postCommitCommand setting will be introduced and lets you run Git Push or Git Sync after a commit.

@joaomoreno joaomoreno added the verification-needed Verification of issue is requested label Dec 3, 2018
@gregvanl gregvanl added the verified Verification succeeded label Dec 4, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality git GIT issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants