Pages

Wednesday, 8 February 2017

How-to add existing local project to GitHub in 10 easy steps



These are the 10 steps.

  1. Login to your GitHub account at www.GitHub.com
  2. Once successful login, create a new repository.
  3. On your Mac or local machine, open terminal application or any other terminal-like application.
  4. On your terminal, change your working directory to your local workspace directory (using cd command).
  5. Type git init to initialise the directory as Git repository.
  6. Type git add .  to add all files to GitHub repository.
  7.  Type git commit -m "First commit from local repository"
  8. At GitHub page, copy the remote repository URL.
  9. At terminal, type git remote add origin remoteURL
  10. Finally, push your local files to remote repository with this command git push -u origin master

No comments:

Post a Comment