"Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx> writes: >> >> It should be (starting from master): >> $ git checkout -b newbranch # create a new branch for your changes >> $ echo "foo" > newfile # edit the file >> $ git add newfile # add it to the index >> $ git commit -m "Add newfile" # commit it >> $ git format-patch master # get a patch >> $ git checkout master # go back to original state >> >> There is now a file 0001-Add-newfile.patch that has your changes. Then >> you can delete newbranch if you want. > > ok, i'll give that a shot, but i'm still sure i've seen a way to do it > that didn't require creating a new branch. > You definitely don't need to create a new branch if you don't want to. (from master) $ echo "foo" > newfile # edit the file $ git add newfile # add it to the index $ git commit -m "Add newfile" # commit it $ git format-patch HEAD^ # get the diff versus the state before $ git reset --hard HEAD^ # reset to state before HEAD^ means "the commit before the one I'm at right now." Eric -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ