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>