how to push code to github using visual studio Code Example

PHOTO EMBED

Sun Jan 02 2022 09:55:14 GMT+0000 (Coordinated Universal Time)

Saved by @cymoon58

how to push code to github from vscodeshell by Determined Dugong on Aug 14 2021 Comment
8

1
git init                                                           // start tracking current directory
 Save
2
git add -A                                                         // add all files in current directory to staging area, making them available for commit
 Save
3
git commit -m "commit message"                                     // commit your changes
 Save
4
git remote add origin https://github.com/username/repo-name.git    // add remote repository URL which contains the required details
 Save
5
git pull origin master                                             // always pull from remote before pushing
 Save
6
git push -u origin master                                          // publish changes to your remote repository
content_copyCOPY

pushing codes to github used main instead of master branch

https://www.codegrepper.com/code-examples/shell/how+to+push+code+to+github+using+visual+studio