Skip to content

Instantly share code, notes, and snippets.

@jamesmaino
Last active February 22, 2023 02:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Handy github commands

Create new git with github repo from command line

gh repo create --source=. --public
git init -b main
git add . && git commit -m "initial commit"
git remote add origin  git@github.com:jamesmaino/<REMOTE_PATH>.git
git push 

If you are modifying a cloned repo and what to change the remote origin you personal account use the following.

git remote set-url origin https://git-repo/<REMOTE_PATH>.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment