```git rebase``` did not work out for me,

```
You are not currently on a branch, so I cannot use any
'branch.<branchname>.merge' in your configuration file.
Please specify which branch you want to rebase against on the command
line and try again (e.g. 'git rebase <upstream branch>').
See git-rebase(1) for details.
```
Checking out to master after fetching works good though.