"Robert P. J. Day" <[EMAIL PROTECTED]> writes:
> what's the easiest way to submit a patch that represents adding a
> new file to my git repo? i'm fairly sure it involves "git add" and
> "git commit". i just want to be able to physically add the file, then
> somehow commit it so it shows up with "git diff", submit that output
> as a patch, then remove the file and any reference to it and get back
> to where i started.
>
> what's the recipe? thanks.
>
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.
Eric
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ