how to delete local commits when get message 'On branch master Your branch is ahead of 'origin/master' by 6 commits.' code example Example: my local branch always ahead origin git pull --rebase