Git – Pushing existing files to a new empty repository

After having created an empty github repository, run the following commands in the directory which content you wish to push.

git init
git add --all
git commit -m "Initial Commit"
git remote add origin https://url-to-repository.git
git push -u origin master

Leave a Reply

  • Your email address will not be published.
  • Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: