git filter-branch --index-filter 'git rm --cached --ignore-unmatch config/databases.yml' 38934e4182..HEAD
or
# create and check out a temporary branch at the location of the bad merge
git checkout -b tmpfix
# remove the incorrectly added file
git rm somefile.orig
# commit the amended merge
git commit --amend
# go back to the master branch
git checkout master
# replant the master branch onto the corrected merge
git rebase tmpfix
# delete the temporary branch
git branch -d tmpfix
Комментариев нет:
Отправить комментарий