I currently have my github pages repository, b.github.io
, which is forked from a.github.io
. The a
repository uses the master branch to publish the content of the website.
Now, I want to contribute to a
via my repository, b
. Because I have good faith in branch management, I wish to split my work on my fork into different branches: somebranch
, another
, etc.
Now, if I do changes to either of these branches, they will not reflect into my Github website (b.github.io
shows the content of master, which is in sync with a.github.io
). I'd need to see these changes to check if my changes work out before calling a Pull request.
How can I view the changes of the seperate branches? I tried things like b.github.io/tree/somebranch
, without much success.
In GitHub Desktop, use the Current Branch drop-down, and select the local branch you want to update. To pull any commits from the remote branch, click Pull origin or Pull origin with rebase. Resolve any merge conflicts in your preferred way, using a text editor, the command line, or another tool.
Click History. On the History tab, click the commit you'd like to review. If there are multiple files in the commit, click on an individual file to see the changes made to that file in that commit.
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
Github pages uses Jekyll to render pages.
So, you can :
I'd need to see these changes to check if my changes work out before calling a Pull request.
You should now (July 2020, 4 years later) be able to view your changes on your second repo (before doing a PR) from... any branch you want.
This is still in beta, but:
Build and deploy GitHub Pages from any branch (beta)
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.
Sept. 2020: this is out of beta!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With