Github basic commands for creating and pushing to Repository

Create repository and populate it with files from computer

  • launch terminal or command prompt
  • git init project1 (create local repository)
  • Create directory with the same name on computer (e:\users\norm\sites\basewp)
  • go to command line and go to directory (e:\users\norm\sites\basewp)
  • Create repository on github.com
  • See commands to push existing repository from command line
  • git remote add origin https://github.com/neuker/project1.git
  • git push -u origin master
  • git clone https://github.com/neuker/basewp (will create clone on computer)
  • Now we can work between github and computer
  • git add . (add all files)
  • git status
  • git commit -m ‘first commit’
  • git push
  • git – will show all commands

Video tutorial on basics of github
github help adding-an-existing-project-to-github-using-the-command-line/

Facebooktwitterlinkedinmail

by Norm Euker