process

This is the process I created when I was working with git

(step 0: setup)
$ git clone git@<server>:<project>.git

(step 1: edit locally)
$ cd <local working dir>
---- edit files ---- (now updates are local)
[$ git add <file>]
[$ git rm [-r] <file>]
$ git commit -am "Refs #0000 - Description"
$ git push

(step 2: push to dev)
$ ssh <server>.com with pass
$ cd dev.<host>.com
[$ pwd (to make sure we're in the right dir)]
$ git pull (now updates are on dev: http://dev.<host>.com/)
(check out on dev, make corrections by following directions from step 1)

(step 3: go live on prod)
$ cd <local working dir>
$ git checkout master
$ git merge origin/dev
$ git push
$ git checkout dev
$ ssh <host>.com with pass
$ cd <host>
[$ pwd (to make sure we're in the right dir)]
$ git pull (now updates are on live: http://www.<host>.com/)
---- you will be prompted to set a message: it should JUST be "Refs #0000" ----

                      --------------------------------------------
==========================================================================================
                      --------------------------------------------

Other Useful git commands
git help
git status
git checkout -- <file | branch>
git branch -d <branch>
git update-index [—-assume-unchanged|—-no-assume-uchanged] -undo commit
git commit --amend -m "New commit message"
http://stackoverflow.com/questions/179123/edit-an-incorrect-commit-message-in-git

create a new branch for dev2:
(local) git checkout -b <branch>
(local) git push -f origin <branch> //create a new branch on the server
(local) git branch -u origin/<branch>
ssh <server> with pass
$ cd dev2.<host>.com
$ git checkout <branch>