###GIT CHEAT SHEET
change directories to your sites folder
cd ~/Sites/
git clone (repository address from github.com)
git checkout -b feature_name
note: you don't have to name it feature_name, you could name it by feature or any other identifiable tag
git checkout feature_name
git status
nothing should have changed since last time
you should already be on your howard branch, but just in case
git checkout feature_name
track changes to modified files
git add .
track changes to new/deleted files
git add -u .
commit all tracked changes to your local branch
git commit -m "type in a short message about what you did"
change from your local branch to the master branch
git checkout master
pull down the latest master brach (it may have changed since you began work)
git pull origin master
change back to your local branch (where your changes are being stored)
git checkout feature_name
rewind all of the changes that you made to your local branch back to it's latest master
and then update its master to the new latest (pulled down in the previous step) lastly reapply your changes overtop of the new master branch
git rebase master
switch back to the master branch
git checkout master
merge your local branch into the "local" master branch
git merge feature_name
send the updated master branch into the internets
git push origin master
check your local branch out again so you are ready to code your next feature etc.
git checkout feature_name
call me over.
Hey -- why not just use the shorthand
git add -A
instead ofgit add .
immediately followed bygit add -u .
? If the point is to make sure new paths are created and to also track changes everytime, git add -A would do both without additional commands :)