How to access Github Wiki Branches - github

I am able to access Github Wiki pages directly using the below URL:
https://raw.githubusercontent.com/wiki/Siminov/android-core/Preface.md
But if I create a branch of master Github Wiki then how to access those pages?

Non-master branches of GitHub wikis are not available through the web interface:
Once you have cloned the wiki, you can add new files, edit existing ones, and commit your changes. You and your collaborators can create branches when working on wikis, but only changes pushed to the master branch will be made live and available to your readers.
The only way to access them is via the wiki repository using whatever software you prefer for working with Git.

Related

GitHub Pages publishing from master vs master/docs or gh-pages branch

I've been able to publish GitHub sites under my domain on GitHub Pages from the master branch without issue, however in the docs it says to use a gh-pages branch or master/docs for publishing projects.
I also have a repository for my homepage index.html file/assets, where I link to each of the published GitHub repositories (which are published to my domain name.com/repo-name).
Why have I been able to publish from the master branch? Is there any reason to publish from the gh-pages branch or master/docs instead for publishing project repositories?
GitHub Pages can publish from any of those sources: gh-pages branch, master/docs, or just from the repo itself. It's more of a preference which route you use.
For example, Jekyll is publishing using the master/docs option. The rest of the repo outside of the docs folder is for the actual Jekyll code. One possible reason is that PR's with new features must also include documentation of that new feature. Otherwise, it won't get merged.
The gh-pages option means that code and documentation can be paced or managed differently. They live in the same repo, but the branches can grow at differing speeds.
In terms of technical differences, there's no technical costs/benefits to each option as far as I know. It's just how you want to organize your code and documentation.
Hope that helps!
GitHub requires user and organization sites to build from master, while project sites can build from gh-pages. If I understand correctly, you are publishing to your user site, i.e. yourusername.github.io.

github site from gh-pages branch

I have GitHub site like example.github.io and want to load this site from the gh-pages branch!
how can I do?
now I can't change branch because my repository name is example.github.io
When you create yourusername.github.io you have to commit directly to master. It's meant as a website (unlike a repo that has a website that hosts to yourusername.github.io/reponame/*.
Since you already have a branch with the website, just merge it into the master branch. This can be done from the command line, the Github website or Github Desktop.
The logic
Example: You have a repo (username.github.io). You also have two repos set up with Github pages: repo-1 and repo-2.
username.github.io is the root. You're free to do pretty much anything you want with it. Creating directories will be relative to the root of the domain. When you connect to the domain, it finds the files from the master branch. If you go into the repo settings for username.github.io, you'll see this:
You're locked to the master branch. You can still use other branches for adding features, but what the actual website consists of is what's on the master branch.
The difference between the username.github.io repo and repo-1 or repo-2 is that username.github.io allows editing access to the directory root (e.g. http(s)://username.github.io/index.html) where as repo-1 and its connected pages would be at http(s)://username.github.io/reponame/index. Since the website is most likely wanted to stay out of the source itself, you can use an alternate branch to host it.
If you go into settings for repo-1 or repo-2, you'll see this:
Here you can pick. If you have multiple branches, you can select a different one to host the pages. You can also select the option to use the /docs folder for the website.
TL:DR; When using username.github.io, the master branch is the one that actually hosts the website. Think of it as the production branch. The others can't be accessed from the website
From the OP's comment:
So I can't use the gh-pages branch for Github site! yes?
Update Sept. 2020: yes, you now can.
You can use any branch you want.
"Build and deploy GitHub Pages from any branch"
Repositories that use GitHub Pages can now build and deploy from any branch.
Publishing to the special gh-pages branch will still work the same as it always has, but you can now choose a different branch in your repository as the publishing source.
This functionality also removes the hardcoded dependency on user and organization pages having a master branch.

github Repository removal/deletion & github pages

If I remove/delete a public repository on gitHub, will it remove all of its clones as well? Secondly I want to share my gaming portfolio on github pages is there any way of doing that without having my repositorys cloned?
If you delete the repo from the GH site, it won't remove any clones created on local machines. It will delete everything on the site repository. You can configure GitHub Pages to publish your site's source files from any of these branches: master, gh-pages, or a /docs folder on your master branch. I'd check out this article, since it explains the details.

How to publish from a different repo in GitHub pages

If I have an HTML project repo in GitHub, can I use my GitHub pages (which is a different repo) to publish it?
Is this article applicable for my requirement?

How to work many users in the same feature in GitHub?

We are 3 developers working in the same feature in GitHub.
There is a master.
Each of the developers has their own fork of the master.
Now each developer added the remote fork of the other 2 developers. And with communication we are pulling the changes of the other 2 developers and then merging and pushing to the developer fork. So the others developers can pull and merge to push again to their fork.
The problem with this approach is that we have more merging to do, that if we were all pushing and pulling to the same branch. And the communication is a must.
We try to make a fork of a fork and we couldn't. Github does not support it.
We try to push to the same branch, we couldn't. It seems that also Github does not support it.
So there is a way in Github we all push and pull to the same branch or repository? And when we finish we do a pull request to a master?
Any recommendation about how to work many developers in the same feature in Github?
Instead of forking and pulling, you can use the other collaboration mode prevalent in GitHub: shared repositories. Shared repositories are useful for small, private development groups.
Give your developers push access to a central repository and they will be able to collaborate without pull requests and excessive merging. (Pull requests are still useful if you decide to use the shared repository model especially for code review and feature discussions.)
In GitHub terminology, a person able to push/pull from a repository is a collaborator. Collaborators are set in the repository settings page.
So there is a way in Github we all push and pull to the same branch or repository? And when we finish we do a pull request to a master?
Start an organization, move your repo there, and give all developers push access.