Skip to content

Instantly share code, notes, and snippets.

@sai10
Last active July 15, 2018 19:02
Show Gist options
  • Save sai10/836c390dbcc61aed3d8e60e578971c5d to your computer and use it in GitHub Desktop.
Save sai10/836c390dbcc61aed3d8e60e578971c5d to your computer and use it in GitHub Desktop.
New repository creation in command line and then pushing to git hub
echo "xxx" >> README.md [or] touch README.md
git init
git add . --all
git commit -m "Initial commit"
git remote add origin <git-web-url>
git push -u origin master
if error: failed to push some refs to <git link> then:
git pull --rebase origin master
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment