Satyan
Satyan

Reputation: 30

How can I connect VS Code source control with a GitHub profile to directly push, commit, and sync changes and even push the repository?

How can I connect VS Code source control with a GitHub profile to directly push, commit, and sync changes and even push the repository?

Committing and syncing with the git repo is easy if we open the proper repo directory to push.

Upvotes: 0

Views: 190

Answers (2)

starball
starball

Reputation: 52023

VS Code should "just work" (see docs) as long as you've configure your git remotes. You can do that via commandline with the git remote commands. If you want to add a remote, use git remote add <name> <URL>. If you want to modify the url of an existing remote, use git remote set-url <name> <newurl>.

For docs, see https://git-scm.com/docs/git-remote and https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes.

I don't know what you mean by "publish" (in contrast to "push"). If you mean publishing a GitHub pages site, that should work automatically when you push changes to the branch that your GitHub pages site is configured to track.

Upvotes: 1

vipul
vipul

Reputation: 34

first copy your repo url then go to source panel click on initialize repository after that click on three dots placed on upper side and than click pull,push option placed in lower column then click on push to and click on add remote and past the copied url and add name and press enter. your github profile is linked

Upvotes: -1

Related Questions