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

后端 未结 7 809
面向向阳花
面向向阳花 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:14

    It will compare commits, you will be able to find file in list.

    1. go to Repository > Compare
    2. paste this url: https://gitlab.com/$USER/$REPO/compare?from=$SHA1&to=$SHA2
    3. hit enter (notice: gitlab will set 'Source' and 'Target' properly)
    4. click button 'compare'

提交回复
热议问题