1) Download the source code from the git repository:
git clone git://address.of.repository/project/ /folder/path/on/my/computer
2) Make some changes to the source code. new files / folders can be added to the project
3) provide your email address and your name for git subscription:
git config --global user.name "Your Name" git config --global user.email you@example.com
After that, you can fix the identifier used for this commit with:
git commit
4) Before committing changes. we must add new files / folders to the local git repository:
in the project folder of the source code
git add <Newfolder> git add <Newfile>
4) And then fix the locally modification with:
in the project folder of the source code
commit -a
interaction window will open
you can verify that the commit detected edited files and new files:
# Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: bin/Makefile.am # modified: configure.ac # new file: src/new.c
under the commit -a window, you must enter a comment for your changes
and then save the commit with Ctrl + O (WriteOut), then Enter and your commit will be saved now
and then exit the commit -a window with Ctrl + X (Exit)
5) now you can create your patch with:
in the project folder of the source code
git format-patch -1
this will create a patch file with a name like 0001-...-...-.. .patch
If you want to create a patch using signed-off-by , just add -s :
git format-patch -1 -s