Home

Published

- 1 min read

Setting Git up for Pushing Commits to GitHub

img of Setting Git up for Pushing Commits to GitHub

You’ll need to set up an SSH key, which you can refer to SSH Key Gen for.

Once that’s done, you need to paste the public key to the your GitHub account settings section by making a new key.

Now, while in the repo you intend to set up for commits/pushing, run:

git remote -v to check the current URL. If it’s https, you need to change it using:

git remote set-url origin [email protected]:<username>/<repo-name>.git filling in the tagged fields with the requisite info.

You may also need to do a git config --global --edit but likely not.

Now, you should be fine to stage and push commits.