I think the answer to this is scattered somewhere in the docs and in other questions here, but I couldn't find something that related exactly to my situation, so I am posting this. Please feel free to point me to any relevant answers elsewhere.
I have three branches: wip
, deploy-dev
, client
.
wip
is the working branch internally for our team. It includes 3rd party keys/secrets and some local environment config.deploy-dev
is also internal, but it has different config to test a deployed version.client
is the branch that gets pushed to the client's remote. It removes 3rd party keys/secrets that we use for testing.
The problem
My wip
branch has lots of commits. For the first release to the client, I would like to squash them into a single commit. So I did this:
git checkout -b client
git reset --soft <first commit>
git add .
git commit -m "v1.0 release to client"
After this first commit in the client
branch, I would like to checkout wip
again and continue working on v1.1. Then I should be able to checkout deploy-dev
and client
respectively and merge wip
into them.
But when I checkout client
and git merge wip
, I am getting the entire commit history back into client
.
I'm missing something easy, but I don't know how to describe it without describing the whole situation. Thanks for the help.