0

I am using git with git flow, and "dev" and "branches". I worked on a feature baaed on dev, then made some commits in dev. Now I want to rebase my feature on the dev HEAD. Rebase works perfectly, but I also have stashed changes in my feature. When I run gitk, everything looks fine, but when I tick "All refs" in view, it shows the feature branch twice - once correctly rebased on dev HEAD, but also on its old position in the branch tree. I assume that it has something to do with stashing, since that doesn't show up without a stash.

before rebase:

A-B-E
   \
    C-D

after rebase

A-B-E-C-D

after rebase with stash

A-B-E-C-D-stash
   \
    C-D-stash

The actual question: are these commits really duplicate? And if yes, what can I do about it?

Narretz
  • 4,396
  • 28
  • 37

1 Answers1

0

You can see the old pre-rebase commits since they are reachable through the stash. Git doesn't change commits when you change history, it just stores new ones.

You can just ignore the commits. If you drop the stash, you won't see them even when you look at all refs. The next git gc (automatic or manual) will delete them.

opqdonut
  • 4,939
  • 20
  • 25