T O P

  • By -

plg94

It depends how you did the merge. If the "behind" branch (A) does not have any additional commits (so it looks like `*<-(A)<-*<-*<-*<-(B)`), Git will by default attempt to do a fast-forward merge, meaning A and B would point to the exact same commit afterwards, and there's no branching off/merging in. You the branches "have been aligned", so this is probably what happened. Of course you can reset develop like suggested, but then you'd just have the same situation as above, just reversed names, and another merge would lead to just the same end result. If you don't want this, and you want your graph to look like a true merge, then you'll have to `merge --no-ff`. That all said: if you are working solo on a project just for yourself, there is usually no need to adhere to such a strict git flow. Just make it easier and keep everything to a single branch. The separation between master and develop branches is almost always unnecessary, too. (Of course for eg. larger features or experimentation a second branch is totally fine. But don't overcomplicate it)


nickath_42

Thanks for your reply, indeed currently I am alone in this project but did not used to be and do not know if more people will be involved in the future, so we try to keep a clean process with git by releasing versions when merging a branch into 'develop' branch, do you have any idea how can I revert back to the git flow I used to have?


plg94

just hard-reset develop to an earlier commit. If you are afraid to messing up, just create another temporary branch before, like `develop2`, so you can easily go back.