I’d like to reclaim the dev branch, but it’s filled with things we don’t want to keep. Can I make it just stop being whatever it is now and be based of staging instead without deleting the history that’s in it? I’d like to set things up like this:
staging __________________________________
dev _________ \______/ \____/
Depends on what you mean by “based off of staging” and “without deleting the history”.
If you mean that you want to act like you merged
devandstagingtogether, but actually have the end result be exactly what is currently in staging, that’s easy. From the root directory of the repository:The key line here is the third one. It’s what overwrites the result of the merge with the exact contents of the
origin/stagingbranch.