Skip to content

fluentcodes/GitSamples-GIT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitSamples-GIT: Github Links

Links to directories in README.md files not working as expected on github. The reason that all files are stored beneath the base path blob,

blob/<branch>/<path>/<fileName>

whereas directories are store beneath the base path tree:

tree/<branch>/<path>

Directories Navigation

To create a link to the actual directory in the README.md file one has to use a link including the branch.

Samples

Files

All file entries starts with a blob in the path. So there are no problems linking to files from a README.md documentation.

Link works Remarks
fileRoot ok
/fileRoot ok
../github-readme-links/fileRoot ok include branch name
../../blob/github-readme-links/fileRoot ok
/../../blob/github-readme-links/fileRoot ok
GitSamples-GIT/blob/github-readme-links/fileRoot nok Proposed in stackoverflow
blob/github-readme-links/fileRoot nok
github-readme-links/fileRoot nok
/github-readme-links/fileRoot nok
dir/fileDir ok
dir/subdir/README.md ok

Directories

All directory entries starts with tree, all README.md files with blob. Some type of links will magically replaced.

Link Works Remarks
dir ok automatic replacement blob by tree
/dir ok automatic replacement blob by tree
../github-readme-links/dir ok automatic replacement blob by tree
../../tree/github-readme-links/dir ok change from blob to tree
/../../tree/github-readme-links/dir ok change from blob to tree
GitSamples-GIT/tree/github-readme-links/dir nok Proposed in stackoverflow
tree/github-readme-links/dir nok
github-readme-links/dir nok
/github-readme-links/dir nok
/ nok points to the non-existing target https://github.com/fluentcodes/GitSamples-GIT/**blob**/github-readme-links
. nok points to the non-existing target https://github.com/fluentcodes/GitSamples-GIT/**blob**/github-readme-links
.. nok points to the non-existing target https://github.com/fluentcodes/GitSamples-GIT/**blob**
dir/subDir ok automatic replacement blob by tree
../tree/master nok
../../tree/master ok Switching to branch.
/../../tree/master ok Switching to branch.

Links

About

GitSamples for GIT using Topic Branches for elementary git operation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published