Menu +

Search Posts

Adding an existing project to GitHub using the command line

  1. Create a new repository on GitHub
  2. Open Terminal
  3. Change the current working directory to your local project
  4. Initialize the local directory as a Git repository
    • git init
  5. Add the the files in your new local repository.
    • git add .
  6. Commit the files that you’ve staged in your local repository
    • git commit -m “First commit”
  7. At the top of your GitHub repository’s Quick Setup page, copy the remote repository URL
  8. In terminal, add the URL for the remote repository where your local repository will be pushed
    • git remote add origin remote repository URL
    • git remote -v
  9. Push the changes in your local repository to GitHub
    • git push -u origin master

https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/

Leave a Reply

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