modified upgrade-git