Basic Git Workflow

#Local work:
        git checkout -b branch_name # creates and switches to branch_name
        git push --set-upstream origin branch_name # create branch on remote repo (github, etc)
        # do work on new branch, test work on new branch
        git add . # add new work to commit
        git commit -m 'commit message here'
        git push # now the remote repo has all of your changes in the branch_name

#Merge in work and push to master branch on remote repo (github, etc)
        git checkout master # switch to master branch so you can merge in your new changes
        git pull # sync up any changes that have been pushed to master by others
        git merge branch_name # merge your changes
        git push #push to remote repo

#All done, now clean up:
        git branch -d branch_name # delete local branch
        git push origin --delete branch_name # delete remote repo branch