Skip to content

Instantly share code, notes, and snippets.

@sai-manoj-kumar
Last active June 7, 2025 04:47
Show Gist options
  • Save sai-manoj-kumar/1493062 to your computer and use it in GitHub Desktop.
Save sai-manoj-kumar/1493062 to your computer and use it in GitHub Desktop.
Handy git commands to create a git repo locally and then push it to github.com
git config --global user.name "Your Name"
git config --global user.email [email protected]
Next steps:
mkdir Test
cd Test
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin [email protected]:userid/Test.git
git push -u origin master
Existing Git Repo?
cd existing_git_repo
git remote add origin [email protected]:userid/Test.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment