Has someone tried to do "git revert <commit> -- <path>"
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Nov 28, 2011, 15:46 UTC
- Message-ID
- <CACBZZX6H7g711C9yoi4pv_DWv021P4vfn-CvVYa-7zufqSQeJQ@mail.gmail.com>
Sometimes I want to partially revert a commit, what I'll do is:
git revert --no-commit <commit> &&
git reset &&
git add <paths> &&
git commitAt which point I'll manually type in the commit window:
Partially revert "description(<commit>)"
This partially reverts <commit>. Only <paths> have been reverted.
Has someone tried to patch the revert logic to just support an optional paths parameter, in which case this wouldn't need to be so hard.