Using git to sign-off a patch

I wrote documentation about Cheese, an application of GNOME, more than a year ago and I was notified this year to sign off a patch which adds a license for the new release.

The notification comes from the Bugzilla Page and the link of the patch that is needed to be updated is this:

https://bug703238.bugzilla-attachments.gnome.org/attachment.cgi?id=248509

So, it is necessary to save the document locally, in this case I saved the patch in /home/Desktop

* Check the git program is already running on your laptop; in case you do not have it, please install it, by `git clone’:git://git.gnome.org/cheese and do not forget to identify yourself:
[yulis@localhost cheese]$ git config –global user.email “jinca@gnome.org”

* After that, get into the file cheese and make sure you have the files according to it:
[yulis@localhost cheese]$ cd cheese
[yulis@localhost cheese]$ ls
AUTHORS     ChangeLog          cheese.doap   COPYING  docs  libcheese  Makefile.am  po      src    tools
autogen.sh  ChangeLog.pre-git  configure.ac  data     help  m4         NEWS         README  tests

* Now, prepare yourself for this two power and delicious commands:

a) Applying the patch:

[yulis@localhost cheese]$ git am ~/Desktop/0001-License-help-under-CC-BY-SA-3.0-Unported.patch

b) Signing the patch:

[yulis@localhost cheese]$ git commit –amend –signoff
[master 6b4d195] License help under CC-BY-SA 3.0 Unported
Author: David King <amigadave@amigadave.com>
21 files changed, 47 insertions(+)
create mode 100644 help/C/legal.xml

* If you want to view the file updated, just command: git log -p

* Finally, we need to do a commit action, so in this case we must update the patch by terminal and replace the old version of the patch we got, with the updated one.

[yulis@localhost cheese]$ git format-patch HEAD~1
0001-License-help-under-CC-BY-SA-3.0-Unported.patch
[yulis@localhost cheese]$ mv 0001-License-help-under-CC-BY-SA-3.0-Unported.patch ~/Desktop/

Screenshot from 2013-08-01 09:16:01

About these ads

About Julita Inca

Ingeniero de Sistemas UNAC, Magíster en Ciencias de la Computación PUCP, OPW GNOME 2011, Miembro de la GNOME Foundation desde el 2012, Embajadora Fedora Perú desde el 2012, ganadora del scholarship of the Linux Foundation 2012, Catedrático USIL desde el 2013, Especialista IT en IBM desde el 2013, con certificaciones RHCSA, AIX 6.1 e ITILv3, a simple mortal, like you!
This entry was posted in GNOME. Bookmark the permalink.

3 Responses to Using git to sign-off a patch

  1. Nelson says:

    Shouldn’t just using:
    git am -s
    be enough?
    Excerpt from the git am man page(http://linux.die.net/man/1/git-am) :
    -s, –signoff
    Add a Signed-off-by: line to the commit message, using the committer identity of yourself.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s