Bitwise » Forums » Commit URLs can be shortened.
cthutu
Matt Davies
4 posts
#16244 Commit URLs can be shortened.
3 months, 1 week ago Edited by Matt Davies on Sept. 5, 2018, 12:04 p.m. Reason: Initial post

I am aware you can type only the first n unique chars of a 40-character SHA-1 code when using the command line of GIT. So I thought I'd test it out on Per's diff commit URLS he shows at the beginning of some of his talks. So instead of:

https://github.com/pervognsen/bit...9158ed34ea757b071fa7fe2b08186e0e2

I just typed:

https://github.com/pervognses/bitwise/commit/147e

and it still works. This makes sense since it's probably using the same git machinery underneath. But I thought it was a good tip to share for people trying to type out those long URLs of his stream. Now, Per has to keep showing all 40 characters because you never know if there's a conflict with only 4 characters (which is the minimum git requires) later on.