GitHub – Push Your Project

  1. Create a repository :
    More infos here : Creating a repository
  2. Initialize  your local repository :
    1. Open Terminal (on OSX).
    2. Go to your local project directory (Introduction to the Mac OS X Command Line).
    3. Type git init
  3. Add all the files  git add .
  4. Commit the files with a comment git commit -m "initial commit"
  5.  Add our remote repository from GitHub git remote add origin<github username>/<repository>.git
  6. Push files to the remote repository on GitHub git push origin master

Our project is on gitHub 🙂

Git Commands:

  • git push origin master: send changes to the master branch of your remote repository
  • git init: initialize a git repository in your directory
  • git status: check the status of the repository
  • git add file_name: add one file
  • git add .: add all files
  • git commit -m “commit message”: commit your files along with a message
  • git remote add origin – the remote url to your GitHub repo
  • git push origin master: push your files up to github on the master branch

More Basic Git commands and more documentation




Laisser un commentaire

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *