Why the running results of different branch codes of git are different

as shown in the following figure, the code for master and hotfix is the same, but it is normal to run the code under hotfix!
when you switch to master, you will report some errors. This is why
clipboard.png

Feb.11,2022

is not necessarily the same. For example, you merge An and master, and then merge B into master,. Although the nodes of their commit are all the same, B! = Master, should be Master


if so, what do you need branches for?


you can checkout the two branches to two directories. Then use a comparison tool such as Beyond Compare to compare the differences between the two directories

Menu