On Gitlab, how to compare a file of two different commits

后端 未结 7 804
面向向阳花
面向向阳花 2021-02-05 02:38

On Gitlab, how to compare a file of two different commits? I know that that on command line git, the command is:

git diff commit1 commit12 -- file_name
         


        
7条回答
  •  醉酒成梦
    2021-02-05 03:23

    You can accomplish this with simple point-and-click through the GitLab web interface, provided the code can be viewed on the screen. On your repository, click on the left Menu option "Commits". The right pane will show a list of all the commit events in the repository. Click on the one that corresponds to the file you're interested in. You will be able to see its "before and after" state. You can see it in "inline" or "side-by-side" mode, where it highlights changes in green.

提交回复
热议问题