keep file changes but remove previous commit log from a branch code example Example: keep file chnges but remove previous commit log from a branch git reset HEAD^