问题描述
在Gitlab上,如何从提交引用开始查看文件?我知道在命令行git上,命令是:
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>
我如何在gitlab上做同样的事情?
how to I do the same on gitlab?
推荐答案
转到URL https://gitlab.com/ $ USER/$ REPO/blob/$ SHA1/path/to/file
Go to URL https://gitlab.com/$USER/$REPO/blob/$SHA1/path/to/file
例如, https://gitlab.com/sqlobject/sqlobject/blob/2ce592300bdd0cfcb444b24cdfd4b2e412fd7bda/sqlobject/main.py -这是来自2ce5923的/sqlobject/main.py
文件. User
是sqlobject
,存储库也是sqlobject
.
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
.
这篇关于在Gitlab上,如何从commit ref开始查看文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!