0

I want to upload a markdown file named "original.md" to a repo, but it has to stay named like that. I want the "README.md" which GitHub displays automatically to link to it.

$ ln -s original.md README.md

It creates a link, then the files look like so:

-rw-r--r--. 1 username username  32K Nov  8 11:33 original.md
lrwxrwxrwx. 1 username username   15 Nov 12 02:23 README.md -> original.md

Now if I stage, commit, and push to git everything will look fine, the "original.md" will display through README.md.

However, what if I change my mind one day and decide that I don't need the README.md anymore because I don't want my files in Git anymore? Let's say I delete it:

$ rm README.md

While this removal have any negative effect on the "original.md" file?

Zoltan King
  • 1,964
  • 4
  • 18
  • 38

1 Answers1

0

No, it is a symlink... you can remove it safely. If you remove original.md instead the symlink will not work anymore.

You can just have a look https://linuxize.com/post/how-to-create-symbolic-links-in-linux-using-the-ln-command/

Riccardo Petraglia
  • 1,943
  • 1
  • 13
  • 25