Link latest file on Bitbucket Git repository

前端 未结 5 1973
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-24 04:21

I have a public Git repository on Bitbucket. I want to link the latest version of a Read-Me file. Here\'s the link to a revision/commit:

https://bitbucket.org/wordle

5条回答
  •  醉酒成梦
    2020-12-24 04:59

    The canonical way to add a link to a file in your repository using Markdown (the default for Readme files and Wiki pages) is by linking to the relative path of the file.

    For example, if I had a structure like so:

    
    |-- my-file.txt
    |    
    |-- my-dir 
    |    |-- my-other-file
    

    I'd be able to link to them as follows:

    [my-file](my-file.txt)
    [my-dir](my-dir)
    [some-other-file](my-dir/some-other-file)
    

    Bitbucket will then automatically link to the file at the current branch that you are viewing the file at. If you're viewing the Readme file in the overview that will mean the default branch (usually 'master').

提交回复
热议问题