How To Make a Patch
The following steps will show you how to make an git patch
- Ensure your git repository is up to date with firestorm:
$ git pull
- Back up any changes you have made, then update the working directory exactly to firestorm:
$ git checkout -f
- Now add your changes to this repository. Verify your changes with:
$ git status
- You should now see your modified files marked with an “M”, “R”, or “A”
- If you do not see an A or R next to a file you want to add/remove, cd to the folder with the file(s) you want to add\remove and use:
$ git add $ git remove
- Commit your changes to your local repository to make a changeset:
$ git commit --author="Yourname" -m "Description of your change"
- Export your changeset to a patch file:
git archive --format zip HEAD --output descOfChange.zip
- Upload your patch file to JIRA
- Make sure to include the name you want listed in our credits window.
Make sure you mention that you give us permission to use and distribute your code under the LGPL (friendly, open source) license or equivalent.
- At this point you may want to roll back your local commit, just to make it easier to track firestorm:
$ git revert HEAD
Note: If you are on Windows and use TortoiseGIT
You can use the Repository Explorer and Windows Explorer context menu extension for updating and reverting the local copy.
Patch files can easily be created on the command line:
- Create a patch file for all changes:
git diff > Mypatchfile.patch
- Or create a patch file for specific files:
git diff file1 file2 file3 > Mypatchfile.patch
More git commands
- For more advanced commands, see: https://git-scm.com/docs