I'm trying to do a similar thing to this: Creating GitHub repository with only a subset of a local repository's history
I currently have all my commits on master and now I want to make a branch called release that only has a single commit of all past commits and no history of the old commits.
I tried using the method in that link but doing so caused any further merges into release to not merge automatically, which is somewhat annoying. (The error it gives is Squash commit -- not updating HEAD. Automatic merge failed; fix conflicts and then commit the result.) Is there a different way of doing it that can still merge automatically?
I know the easiest method would be to create a separate repo but, ideally, I'd rather just use a branch.
I want it to end up looking something like this:
v1 is a merge from commit 2, v2 is a merge from commit 5, etc.
[release]:
- v2
- v1
[master]:
- commit 5
- commit 4
- commit 3
- commit 2
- initial
I'm new to git so sorry if this is really obvious! Thanks!