CS174
Chris Pollett
Oct 28, 2020
git format-patch rev1 rev2
git format-patch e3e4f2067 --stdout > my.patchHere no rev2 is given so it will be assumed to be HEAD.
% git apply --stat my.patch test1.php | 2 ++ test2.php | 2 ++ test1.php | 1 + test2.php | 2 -- 4 files changed, 5 insertions(+), 2 deletions(-)
git apply --check my.patch
git am --signoff < my.patch
git tag -a tag_name revision -m "message about creating tag"For example, in our myrepos example, we might make some changes and commit and the commit has version number. We could make a v1 tag as follows:
git tag -a v1 c3ac05c -m "Made Version 1"
git fetch --tagsIn our case, we could cd into myrepos2 and then type this line.
cd ../myrepos2 git pull git fetch --tags
git checkout tags/[tag_name]In our example, in myrepos2, we could type:
git checkout tags/v1
git config --global user.name "YOUR NAME" git config --global user.email "YOUR EMAIL ADDRESS"
https://github.com/ORIGINAL_USERNAME/PROJECT.gityour fork wil be
https://github.com/YOUR_USERNAME/PROJECT.git
git clone https://github.com/YOUR_USERNAME/PROJECT.git
git remote add upstream https://github.com/ORIGINAL_USERNAME/PROJECT.git
git push origin masterto send them back to GitHub in our workspace on GitHub.
git fetch upstreamthen check out our local branch
git checkout masterand finally merge changes (we might need to resolve conflicts like described earlier)
git merge upstream/master
We now want to consider adding dynamic behaviors to our websites as they are interacted with on the client-side. To do this, we will use the Javascript language.