On 7/5/07, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
On Thu, 5 Jul 2007, Eric Lesh wrote: > 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." actually, a little experimentation suggests that this might be all i need: - physically add <new file> $ git add <new file> $ git diff HEAD > patchfile - physically remove <new file> $ git rm <new file>
Yep, or instead of git-rm, you can just do `git-reset --hard HEAD`. It's essentially the same, since you did no commit'ing. Thanks, Nish -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ