Here\'s an example:
>git status
# On branch master
nothing to commit (working directory clean)
>git checkout -b test-branch
>vi test.c
>git add t
A general solution (if you don't know the name of the upstream branch) is:
git rebase -i @{upstream}
Note that if your upstream (probably a tracking branch) has updated since you last rebased, you will pull in new commits from the upstream. If you don't want to pull in new commits, use
git rebase -i `git merge-base --all HEAD @{upstream}`
but that is a bit of a mouthful.