Search code examples
gitgithub

Is there a way to add a link to the current repo in Github README.md?


Most of my repos' README.md files include instructions on how to clone/build/run/test the code:

$ git clone https://github.com/TravelingTechGuy/app-store-validator.git
$ cd app-store-validator
$ npm i
$ npm run build    #lint and build
$ npm run test     #run unit tests

The problem is the link is repo-specific, i.e. if the repo has been forked/transferred, the README would still contain a link to my original repo. I ran into at least one case of someone forking a repo, and then copy/pasting the installation instructions, and not understanding why changes are not present.

My question: is there any way to put a link to the current repo in the README file? Such that when cloned, will point to the cloned repo?


Solution

  • The markdown file is static. There is no way to do that.

    Instruct your users to copy the URL from the widget on the right column:

    enter image description here