Adam's Lair Forum

game development and casual madness
It is currently 2017/04/26, 21:22

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2016/09/16, 12:14 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 1949
Location: Germany
Role: Professional
Hello everyone,

in the wake of a potential project folder restructure operation, it occurred to me that we're doing a poor job with future-proof GitHub links.

Whenever we link source code, we actually mean to link the current version, right? However, a file might change (invalidating line numbers), be renamed or moved (invalidating the link itself) and thus the link we posted will no longer work in a few months / years when someone comes searching.

Good thing is, GitHub has actually a nice hidden feature that will rescue us if we stick to using it from now on. Whenever opening a file on GitHub in order to copy the URL to link it, press Y first. GitHub will redirect your page to the specific permalink of the version you're currently looking at. Using this link, it won't matter at all what happens to the file in the future. It will always remain as-is.

Example:
This link will break.
This link should work fine even after the source code changed.

So in the future, whenever you link to a file, please add that additional key press to your routine. It's nothing much, but it will help a lot in the long run.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2016/11/13, 14:46 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 1949
Location: Germany
Role: Professional
The project structure has changed, so a lot of old source code links using the non-versioned master branch URL are now likely broken. You should, however, be able to locate the same file manually on GitHub.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group