Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
388 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...