Token to represent initial commit in to a repository? #17876
Unanswered
stevecondylios
asked this question in
Other Feature Feedback, Questions, & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Comparing two commits from the same branch is made very convenient by the ability to place
/compare/<first_commit>...<second_commit>behind any repository URL.For example:
put together
i.e. rails/rails@db045db...e0b58f6
This feature is incredibly powerful.
But it gets better still, because if one of the commits you're comparing is
HEAD, you can write that directly into the URL without even having to look up its SHA! E.g. rails/rails@db045db...HEADIdea
In the same way we use
HEAD, it would be extremely useful to haveINITorFIRSTor some token to represent the first or initial commit in a repository.Example:
rails/rails@db045db...HEAD
could become
rails/rails@FIRST...HEAD
which can be written in its entirely without any lookups, clones, or use of other tools like the API - no fiddling whatsoever.
Why?
Many new projects start with boilerplate code. Therefore, quickly and easily examining the diff between the boilerplate (first commit) and the end result (HEAD) is very powerful.
That can be done with the technique outlined above, but, you still have to get the SHA for the first commit, which is less convenient, especially on large projects where pagination (to get the SHA) is a bit of a nuisance, necessitating cloning or use of the API. Admittedly, this only takes a minute, but it would still be great to avoid it.
What I know so far
I asked here if anyone knew a way and some GitHub users mention in the comments that, to their knowledge, such a feature does not exist. So I figured I'd raise it in case it could be made possible.
Beta Was this translation helpful? Give feedback.
All reactions