git cvs - Reverting part of a commit with git -
i want revert particular commit in git. unfortunately, our organization still uses cvs standard, when commit cvs multiple git commits rolled one. in case love single out original git commit, impossible.
is there approach similar git add --patch
allow me selectively edit diffs decide parts of commit revert?
use --no-commit
(-n
) option git revert
, unstage changes, use git add --patch
:
$ git revert -n $bad_commit # revert commit, don't commit changes $ git reset head . # unstage changes $ git add --patch . # add whatever changes want $ git commit # commit changes
note: files add using git add --patch files want revert, not files want keep.
Comments
Post a Comment