I'm knew to git and using TortoiseGit and Visual Studio Code. I try to achieve the following, but wasn't able to and didn't find solutions on the web yet: 2 branches: master and daily-backups daily-backups as the name implies should store a daily status. The master branch however should not contain all commits of the daily-backups branch after merging, but only milestones. So I wanted to have the following structure:
Master: m1 - - - - - - - - m2 - - - - - m3...
daily-backups: - b1 - b2 - b3 / - b4 - b5 /
I tried it with the activated squash option in the TortoiseGit Merge command. After commiting this to the repo I got the following:
Master: m1 - - - - - - - - stashed-commit
daily-backups: - b1 - b2 - b3
but b3 isn't "linked" to the stashed-commit, although they contain identical code. Is there a way to achieve this? Also this seems a bit messy, as when I try to use daily-backups afterwards. I get an merge conflict at the next merge into the master branch.
I already tried doing a normal merge (without stashed option) afterwards, but this includes all daily-backup commits into the master branch.
Any suggestions?
question from:https://stackoverflow.com/questions/65652165/git-stash-merge-into-master-branch