Hey guys, i keep running into this issue with git and it is quite frustrating and im sure there must be a better way. My usualy workflow is this
Dev Branch:
A: add something
B: fix something
Squash merge A and B as C into master: Feat(added something)
So now master is nice and neat and dev is messy.
If i start editing dev again and push, then i get a merge conflict because dev isnt the same as master
What i have been doing so far is
git push origin dev
// then squash merge into master and delete dev on origin
git switch master
git pull origin master
git branch -D dev
git switch -c dev
git push origin dev
so then i can work on the next thing and merge that into master without conflicts. But this feels like not the best way to do.
im asking especially because i will release my app soon and i want a production branch ideally with neat squash commits but then it'd be a lot of resolving conflicts. Is there any better way / suggestions you guys might have?
Thank you in adnvance🙏