I created gh-pages branch for a repo on github. In that branch, I want to have an index.html file and a master folder being a “symbolic link” (?) to the master branch. I want to be able to link to files in master from index.html.
I did what help page told me to:
$ cd Repos/ampere
$ git fetch origin
remote: Counting objects: 92, done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 68 (delta 41), reused 0 (delta 0)
Unpacking objects: 100% (68/68), done.
From git@github.com:tekkub/ampere
* [new branch] gh-pages -> origin/gh-pages
$ git checkout -b gh-pages origin/gh-pages
Branch gh-pages set up to track remote branch refs/remotes/origin/gh-pages.
Switched to a new branch "gh-pages"
I’m now in gh-pages with single index.html file. What am I supposed to do now?
You have an index.html page; so it’s just like writing a web site. If you want to have links in your page you do it the same way as you add any kind of link to a web page.
Since you’re in a different branch, and since that branch is independent (i.e. it doesn’t come off the same root as the main project) it doesn’t know about the other branch so you can’t just link to it unless you add those files at the repository level.