Wednesday 25 November 2020

Git-two commits both success, but local compile error

 Today got an interesting but kind of weird issue after pull the latest code from git repo.

The auto-build task passed for both two commits but local build fail.

The commit1 has committed Class1, Class2;

The commit2 has committed Class3, but renamed the above classes to class1 and class2 (lower-case). As the two commits at the same time, I suppose the second developer either did not pull the code before push. So his pull reques also got passed. (bad code review here !)


If pull both the commits to local, compile error occurs cause cannot find Class1 and Class2.