Skip to content

Instantly share code, notes, and snippets.

@shaunthomas999
Last active August 9, 2019 16:31
Show Gist options
  • Save shaunthomas999/216598d415474ebdd4e28ebd256ec23d to your computer and use it in GitHub Desktop.
Save shaunthomas999/216598d415474ebdd4e28ebd256ec23d to your computer and use it in GitHub Desktop.
Github new repo creation - Self reference (PS: steps not complete)

Create a new repository on the command line

git init
git config user.email shaunthomas999@gmail.com
git add -A
git commit -a -m "first commit"
git remote add origin https://github.com/shaunthomas999/01_Java.git
git push -u origin master

Reset first commit and push again

git update-ref -d HEAD
git push --force

Push an existing repository from the command line

git remote add origin https://github.com/shaunthomas999/01_Java.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment