Get the latest updates to all the remote branches
git fetch --all
fetch
ing instead of pull
ing so we don't clobber our working directory with a merge... yet.--all
makes 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
21345
followed by a meaningful name of sorts twig-views-rss
.Apply the Patch to your git
curl http://drupal.org/files/patch-name-21345-2.patch | git apply --index
Shortcut: alias cape='curl `pbpaste` | git apply -v --index'
curl
followed by the patch URL will print the patch contents to standard output.|
will pump the standard output into the git apply
command.--index
will do the equivent to a git add -A .
and the changes are staged.cape
and 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"
-A
flag 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 show
is equivilent to git diff HEAD~1..HEAD
except 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
21345
and the next comment #3
for the comment we are about to post.