Reputation: 230048
Here is a sample project on github: http://github.com/ripper234/Test-grails-project
I would like to capture the latest revision, and send a link to it to someone, so that even if the project changes later he will see the specific revision I was talking about. I guess forking could do that, but it's overkill.
How do I do that?
Upvotes: 45
Views: 30640
Reputation: 131
The URL format is as follows: https://github.com/USERNAME/REPO/blob/COMMITID/FILENAME
Replace the capitalised elements with details for your case
Upvotes: 1
Reputation: 10867
To access a single file or directory:
Upvotes: 18
Reputation: 8283
To show the state of the project at a specific commit:
https://github.com/
<user>/
<project>/tree/
<commit-hash>
For example:
or with shortened hash from git log
https://github.com/toraritte/software-licensing-a-primer/tree/9f122e0
The easiest way without editing the URL is:
- Choose a commit (either the latest or from the list of commits)
- Select "Browse files"
Upvotes: 10
Reputation: 5378
as mentioned in other answer - for latest commit y
is the shortcut
for any commit
click on commits
and then click on code
icon (octicon-code)
Upvotes: 2
Reputation: 8576
Just press y
and the URL will change automatically to reflect the current version.
Upvotes: 50
Reputation: 5190
let's say you would like that the someone you send this link
has to work on the resulting code of this commit.
he would do this:
now the user has a branch with the code of the mentioned commit.
does this answer your question? -> not sure if I understood it right...
Upvotes: 5