Get the latest updates to all the remote branches
git fetch --all
fetching instead of
pulling so we don't clobber our working directory with a merge... yet.
--allmakes sure all branches are fetched, not just the tracking branch.
Make a new branch for the issue you are working on.
git checkout origin/8.0.x -b 21345-twig-views-rss
21345followed by a meaningful name of sorts
Apply the Patch to your git
curl http://drupal.org/files/patch-name-21345-2.patch | git apply --index
alias cape='curl `pbpaste` | git apply -v --index'
curlfollowed by the patch URL will print the patch contents to standard output.
|will pump the standard output into the
--indexwill do the equivent to a
git add -A .and the changes are staged.
capeand the patch will swoop in to the rescue.
Add and Commit the patch
git commit -m "21345-2"
Test and/or fix ...
Add files and Commit changes
git add -A . && git commit -m "21345-3 fixed some unicorns... etc"
-Aflag makes sure that additions, modifications and file deletions get staged.
&&Allows for two commands to run right after eachother on one line.
Rebase to make sure you have the latest from core
git fetch --all && git rebase origin/8.0.x
Make an interdiff (diff between last two commits)
git show > interdiff.txt
git showis equivilent to
git diff HEAD~1..HEADexcept it has commit messages/notes in it.
>will take the output and send it to a file of which we name after it.
Make a new patch
git diff origin/8.0.x > name-of-patch-21345-3.patch
21345and the next comment #
3for the comment we are about to post.