Git: How to upload files into Github repository with command-line

0 votes
230 views
added Jul 26, 2017 in Git by LC Marshal Captain (25,790 points)
recategorized Nov 17, 2017 by LC Marshal
  1. Create new repo in github e.g https://github.com/username/new-repo.git
  2. go to local directory
  3. Go to local and cd to the directory e.g 'new-repo' directory, hence cd (or git bash here) wamp/www/github/new-repo/
  4. In 'new-repo' --> git init
  5. Add all files into repo  --> git add <filename>
  6. Stage and commit all files --> git commit -m "your initial push"
  7. Add files into remote --> git remote add origin https://github.com/username/new-repo.git
  8. Push files --> git push -u origin master
  9. done.

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...