Update 2022-12-27

On the Source Control tab (Ctrl++G or ^++G on Mac), press to access Git commands dropdown menu:

  1. Switch to the branch to push – Branch > Create Branch OR Checkout to... > Create New Branch

  2. Press the Commit & Push button (if not visible, press under the Message text box)

  3. two popups will show up for you to confirm staging, committing and pushing of your changes to this new branch

Alternative using only menu options:

  1. Switch to the branch to push – Branch > Create Branch OR Checkout to... > Create New Branch
  2. Stage your changes – button above the files list OR Changes > Stage All Changes (several Git: options available)
  3. Commit your changes – top left button OR Commit
  4. Push the new branch: Branch > Publish Branch (or just use the Push option and press OK in the popup)

All above options can be accessed through commands F1 (Mac: fn+F1 or ++P) and typing git [command], e.g. "git checkout".

For previous versions, check this answer's timeline.

Answer from CPHPython on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › sourcecontrol › overview
Source Control in VS Code
November 3, 2021 - You can publish a local repository directly to GitHub with the Publish to GitHub command, which creates a new repository and pushes your commits in one step.
🌐
Microsoft Learn
learn.microsoft.com › en-us › visualstudio › version-control › git-make-commit
Make a Git commit in Visual Studio | Microsoft Learn
March 26, 2026 - The equivalent command for this action is git commit -a. Visual Studio also makes it easy to commit and sync with one click by using the Commit All and Push and Commit All and Sync shortcuts.
Discussions

How to git push to a different branch with Visual Studio Code? - Stack Overflow
I realized that after a commit in VSCode there's a "Push" menu option that pushes the commit to the default branch. However, I often need to push it as well to different branches. Is there a way t... More on stackoverflow.com
🌐 stackoverflow.com
How do you push and commit to git directly from VS code - Stack Overflow
Having gitbash installed I think it should be possible to commit from VS codes interface More on stackoverflow.com
🌐 stackoverflow.com
Committing and pushing from vscode instead of GitHub Desktop
You should be able to get an output log of the git command it runs to understand what happened/is happening. I think it is available in the drop-down from the output pane. The git integration is great, it's one of the main reasons i use vscode. More on reddit.com
🌐 r/vscode
4
7
August 22, 2022
Using github and VS Code?
Step by step tutorials: https://vscode.github.com/ More on reddit.com
🌐 r/webdev
23
16
May 8, 2024
🌐
Visual Studio Code
code.visualstudio.com › docs › sourcecontrol › quickstart
Quickstart: use source control in VS Code
November 3, 2021 - Select it to pull new changes from the server and push your commits. To pull or push individually, select the ellipsis menu (...) in the Source Control view and choose Pull or Push.
🌐
An Amateur Computational Mathematician
scaomath.github.io › blog › git-workflow-vscode
Shortcut to git commit and push in Visual Studio Code - An Amateur Computational Mathematician
July 4, 2021 - && rm -rf _site/ && touch .nojekyll && \ git add . && \ git commit -m "Update build site" && \ git push --all origin && \ git checkout source
🌐
YouTube
youtube.com › watch
How to commit and push in git using visual studio code - YouTube
Learn how to commit and push in git using visual studio code.Visual Studio Code (VS Code) has become one of the most popular code editors among developers du...
Published   May 22, 2023
🌐
Medium
ngochang29397.medium.com › git-visual-studio-code-quick-way-to-commit-changes-d80041c9db08
a super quick way to commit code — git +Visual Studio Code | by Jelly Tran | Medium
January 7, 2021 - So I found out that I could simplify ... box · My new quick commit could be wrapped up in these steps: cmd+shift+G => typing “commit message” => cmd + enter · The all the changes in source code are added, committed, and pushed ...
Find elsewhere
🌐
Reddit
reddit.com › r/vscode › committing and pushing from vscode instead of github desktop
r/vscode on Reddit: Committing and pushing from vscode instead of GitHub Desktop
August 22, 2022 -

Not sure if this belongs in r/github r/git or r/vscode.

I have recently started using GitHub desktop to commit and push my projects to GitHub from vscode, to be able to work on them on both my desktop and laptop. Well, I recently downloaded Git because I saw a source control tab in vscode. So I logged in to GitHub and it automatically connected to my repository. Now I get letters next to the files when I edit them. (Sorry if the terminology is wrong, I'm a noob). I thought this was great because not the commit and push button will be in vscode (I don't have to open GitHub desktop). Well when I use the button in vscode, it just keeps working. It never finishes (and I cant see any progress). So I have to close down vscode, open github desktop and commit and push from there like I used to (the commit and push take less than 5 seconds). What could be wrong with the button in vscode?

🌐
Graphite
graphite.com › guides › how-to-push-code-from-vscode-to-github
How to push code from VS Code to GitHub - Graphite
Press Ctrl+Enter to commit the staged files. ... Click on the '...' button at the top of the Source Control panel, then select "Push" from the dropdown menu.
🌐
GitHub
microsoft.github.io › vscode-essentials › en › 05-git.html
Use Git in VS Code · Visual Studio Code - The Essentials
The push command is accessible from several places: in the status bar, to the right of the current branch name, in the command palette Git: push, or in the context menu of the sidebar, accessible on the ... icon at the top right. Retrieving remote commits is also simple using the Pull (pull) ...
🌐
Reddit
reddit.com › r/webdev › using github and vs code?
r/webdev on Reddit: Using github and VS Code?
May 8, 2024 -

Hey everyone!

I know i’m going to sound pretty stupid for this but i’ve looked all over youtube and all of the videos are from years ago or don’t really explain it well in my opinion. Can someone here explain to me in the most basic terms how to use github and vs code together so that i’m able to access my code from both my laptop and desktop

update: thank you so much everyone! i was able to figure it out

🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Auto Git Commit and Push - Visual Studio Marketplace
Extension for Visual Studio Code - Automatically commit and push changes to Git on file save
🌐
GeeksforGeeks
geeksforgeeks.org › git › gitpush-with-visual-studio-vs-code
GitPush With (Visual Studio) VS Code - GeeksforGeeks
July 23, 2025 - ... import './App.css'; function App() { return ( <div className="App"> <header className="App-header"> <h2>Hello GFG</h2> </header> </div> ); } export default App; ... Step 7: Then commit all changes using this command : git commit -m "change ...
🌐
GitKraken
gitkraken.com › home › blog › using vs code & git
Using Git with VS Code
February 24, 2023 - Go through a basic Git workflow using VS Code. Learn how to create a repository, commit changes, connect a remote, push changes, and other tips for leveraging Git with VS Code.
🌐
Visual Studio Code
code.visualstudio.com › docs › sourcecontrol › intro-to-git
Introduction to Git in VS Code
November 3, 2021 - Select it to pull new changes from the server and push your commits. To pull or push individually, select the ellipsis menu (...) in the Source Control view and choose Pull or Push.
🌐
JC Chouinard
jcchouinard.com › accueil › how to commit and push code to github repository (vs code example)
How to Commit and Push Code to Github Repository (VS Code Example) - JC Chouinard
April 4, 2025 - To commit and push code to Github from Visual Studio Code, open the project inside VS Code, make any modification to file or folders, stage the changes and finally commit and push the changes from the source control panel.
🌐
The Ohio State University
u.osu.edu › sdpsimulator › software-tips › version-control › using-git-in-visual-studio-code
Using Git in Visual Studio Code | FEH SDP Simulator - U.OSU
Run make clean or mingw32-make clean in the VS Code terminal to remove .o and .exe files · Select the Source Control view in VS Code on the left-hand menu bar, shown in Figure 1 ... Write a Git Commit Message (see the page on Git Commit Messages for tips on how to write a good commit message.)
🌐
Techielass
techielass.com › how-to-push-code-from-vs-code-to-github
How to push code from VS Code to GitHub
October 23, 2025 - ... Once created, copy the repository's URL from the quick setup section. ... Switch back to your VS Code editor. Click on the ellipsis (...) in the source control view, select Pull/Push from the drop-down menu, and choose Push to.