Skip to content

Add git autopush option when committing (revisited) #62058

@addisonElliott

Description

@addisonElliott

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.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitygitGIT issuesverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions