Remotely, I have two branches: dev and master.
I implemented 3 features(Feature A, B, C) and have local branch for each them. Then I merge these 3 features into dev branch one by one. Some day, I want to release the my changes, so I merge dev to master using squash merge. Now the remote master has Feature A, B and C.
Then, I implemented a Feature D and merge from local Feature D branch to dev. I merge the dev to master by sending a pull request. However, I found that the commits of Feature A, B, C are also showing in this pull request. It is very confusing, but I found the answer here to explain it: Github "Squash and Merge" - subsequent pull request showing all previous changes Which mentions the best practice is to delete a branch after it is merged. However, I cannot delete the dev branch. I would like to know what is the best practice in my case has two remote branch? Is it reasonable for me to merge dev with Feature D into master by ignoring the duplicate commits in pull request?