0

enter image description here

I requested pr#1 from origin/master to upstream. Then I created a new branch ipython_feature while checkout in the master. Before merging pr#1 I requested pr#2 which has some changes with pr#1. Later mt pr#1 has merged successfully. Now I could not squash the last 6 my commits from the ipython_feature branch. I couldn't squash all my commits. Any help will be appreciated on how to squash in this scenario? I used git rebase -i Head~6 in the ipython_feature branch but returns fatal: invalid upstream 'Head~6'.

1 Answers1

1
    fatal: invalid upstream 'Head~6'

Note that HEAD and Head are not the same; hence the error message. It’s also confusing because the word “upstream” is being used in two completely different ways. — If you just want to squash the whole branch, you do not need interactive rebase. Say

git checkout ipython_feature
git reset --soft HEAD~6
git commit -m"message"
matt
  • 515,959
  • 87
  • 875
  • 1,141