git add path/to/file1 path/to/file2
git commit -m "templates: Changed the XX template to do XX"
git push
git checkout path/to/file_that_has_changed
git pull --rebase
We use remote tracking branches for branching.
git checkout -b ajax_fallback
git push -u origin ajax_fallback
git push
If you get an error, pull the latest files, then try again:
git pull
git push
If, after that, you still get an error for "git push", pull on master, then
go back to the branch and try again:
git checkout master
git pull --rebase
# Try again.
git checkout ajax_fallback
git push
If, after that, you still get an error and the error message contains
"[rejected]", then find the branch name next to "[rejected]" and update it.
Then go back to the branch and try again.
git checkout branch_that_was_rejected
git pull
# Try again.
git checkout ajax_fallback
git push
git pull
git merge master
git push
If you get an error for "git push", do a straight "git pull" WITHOUT "--rebase".
git pull
git checkout master
git diff master ajax_fallback
When you're ready to merge the branch back into master:
# Double check the full diff of what changed.
git checkout master
git diff master ajax_fallback
# Merge it (keep in mind you're still in master).
git merge ajax_fallback
git push
# Delete the local and remote branches.
git branch -d ajax_fallback
git push origin :ajax_fallback
git checkout master
git branch -D ajax_fallback
git push origin :ajax_fallback
git checkout --track origin/ajax_fallback
git push
git pull
git merge master
git push
git checkout master
git diff master ajax_fallback
Generally all of our branches are remote, but if you want to create a local one, a few things are different -- namely to use "git rebase master" when you pull changes from master.
git checkout -b ajax_fallback
git rebase master
git status
git branch -a
git remote show origin