Can I post both my code and link to the external repository?

I have read the guidelines and FAQ, and understand that code up for review should be posted on this site. I also understand that modifying the code after it is posted goes against the rules as well as asking reviews to be conducted off site.

However, I would like to know if it is still acceptable to add a link in the question to the external repository in addition to my code.

question
description | Source: <http://foo.com>
{ code }

• Welcome to Code Review, and thanks for taking the time to acquaint yourself with our rules and standards. – 200_success Feb 16 '15 at 10:13
• I thought this answer explained this well: If your code is too long, please select only the portions of the code where you are especially interested in getting reviewed. In such a case, you may add a link to a site where more of your code can be seen, but don't expect anyone here to review it. Any suggestions for how that answer can be improved to make it more clear? – Simon Forsberg Feb 16 '15 at 11:16

Yes, many question do in fact have links to an external repository where the complete code is hosted. The important thing, as you noted, is to ensure that the relevant code to be reviewed is embedded in the question itself. Reviewers may consult the external code, but shouldn't be under any obligation to do so.

If linking to a version-controlled repository, such as GitHub, it is strongly recommended that you link to the version that captures the state of the code at the time that the question was asked. It's generally easy to hop from there to the latest version, but relatively difficult to find the relevant commit by hunting backwards through time.

• Got it. Thanks. – Jorge Bucaran Feb 16 '15 at 10:13