git checkout yourBranch // change master to whatever the base branch is. git reset $(git merge-base master $(git branch --show-current)) git add -A git commit -m "one commit on yourBranch"