Git Commands

Git Command


Summary

There are the commands I use with git.


Detail

Start a new repository on github

mkdir regexplanet-perl
cd localdir
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin [email protected]:userid/repositoryname.git
git push -u origin master

See local changes

git status

Commit everything locally

git commit -a -v -m 'message'

Push changes to github

git push origin

For a repository you created on GitHub

mkdir repositoryname
cd repositoryname
git init
git remote add origin [email protected]:userid/repositoryname.git
NOT SURE: git pull origin