github push pull commit code example

Example: github repository pull commit push

My Github Guide
===============
# To make a new commit:
$ git commit -am "My commit message here"

# To update repository: (master)
$ git pull origin master

# Delete all unCommitted changes
$ git stash

Branches
========
# Check out branch ut using on
$ git branch 

# Create new branch
$ git branch MyNewBranch

# Switch to branch
$ git checkout MyNewBranch

# Return to old commit
$ git checkout COMMIT_HASH
(Example: git checkout a0e3d36ae57a06ac31c70ed7008c58c044e13364)
git merge MyNewBranch (Like commit to MyNewBranch)
git push
# Now MyNewBranch is the old commit!
# U can also just commit&push if u want to go back without branch

More git commands
=================
$ git log
$ git log --oneline