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

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

    You can open two tabs:

    1. go the list of commits (in the sidebar: Repository -> Commits), from where you have the SHA of any given commit (there's the copy button on right) handy;
    2. go the the compare tool (in the sidebar: Repository -> Compare), and at the top, in source and target, past the SHA strings of the two commits you want to compare.

提交回复
热议问题