Jonny Zone : Copyleft – all rights reversed

October 5, 2008

Creating patches using git

Filed under: Dicas — acassis @ 2:48 pm

Creating patches using git is very easy and fast.
I will summarize the steps I followed to create my patches to U-Boot:

* First all create a new branch (see below how to do that);

* Change to created branch;

* Make your modification to files;

* For each logical change (a logical change can involve more than one file modification) make a commit;

* Finally create patches between the “master” and your branch.

To visualize branches:
git branch

To create a new branch:
git branch testbranch

To change to created branch:
git checkout testbranch

Track new files:
git add cpu/arm1136/mx31/nand_copy.S

To make a commit:
git commit -a

To delete a branch (you need be in other branch to do that):
git branch -D testbranch

To remove the last commit:
git reset --hard HEAD^

Create patches between two branches:
git format-patch master..testbranch

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.