On Gitlab, how to view a file as of commit ref

2019-08-28 09:30发布

问题:

On Gitlab, how to view a file as of commit ref? I know that that on command line git, the command is:

git show <commit ref>:<file_name>

how to I do the same on gitlab?

回答1:

Go to URL https://gitlab.com/$USER/$REPO/blob/$SHA1/path/to/file

For example, https://gitlab.com/sqlobject/sqlobject/blob/2ce592300bdd0cfcb444b24cdfd4b2e412fd7bda/sqlobject/main.py — this is /sqlobject/main.py file from commit 2ce5923 of SQLObject. User is sqlobject, repository is also sqlobject.



标签: git gitlab