nus-cs2103-AY2122S2 / forum

13 stars 1 forks source link

Is the master branch on the team repo supposed to show individual commits even when following forking workflow? #207

Closed limweiliang closed 2 years ago

limweiliang commented 2 years ago

Hi all, my team has been following the forking workflow, but when I was looking at the commit history of Master on GitHub, it seems that even the commits done under individual branches are making it into the master branch commit history. From the lecture, I was under the impression that following this workflow would allow for a clean master branch commit history where we only see the merge commits, so may I ask if this is intended behaviour?

Thanks!

Screenshot 2022-03-14 at 4 09 55 PM
damithc commented 2 years ago

Hi all, my team has been following the forking workflow, but when I was looking at the commit history of Master on GitHub, it seems that even the commits done under individual branches are making it into the master branch commit history. From the lecture, I was under the impression that following this workflow would allow for a clean master branch commit history where we only see the merge commits, so may I ask if this is intended behaviour?

Yes @limweiliang this is expected. The merge commits forms the 'trunk' of the version tree but the branches are still there. The 'squash and merge' option will result in a tree without the branches but we don't want you to do that because we want (for grading purposes) to keep track of when exactly you committed code, even the intermediate commits.