If you commit a private information and want to take it back, do git reset

git reset --hard HEAD^ # reset TWO commits
git reset --soft # stage all the previous commits but not commit them.
# you still have a chance to modify the previous commit
# by adding to or taking away from it.

Archive

Rebase

git rebase saves stuff from your current branch that isn’t in the upstream
branch to a temporary area. Your branch is now the same as before you started
your changes. So, git pull -rebase will pull down the remote changes, rewind
your local branch, replay your changes over the top of your current branch one
by one until you’re up-to-date.