Skip to content

Instantly share code, notes, and snippets.

@mikeblum
Last active February 17, 2022 19:51
Show Gist options
  • Save mikeblum/ebe8f078ee17f794e4d2 to your computer and use it in GitHub Desktop.
Save mikeblum/ebe8f078ee17f794e4d2 to your computer and use it in GitHub Desktop.
Branching/tagging Github Wikis

##Branching/tagging Github Wikis##

###Creating an HPI Wiki release###

Download HPI

git clone https://github.com/tsgrp/hpi.git hpi

Download the HPI Wiki - this url is found by adding wiki to the repository Git url:

git clone https://github.com/tsgrp/hpi.wiki.git hpi-wiki

cd hpi-wiki

git branch lists the following branches:

  • master
  • 2.3-wiki

Create a new wiki branch:

git branch 2.4-wiki

git branch lists the following branches now:

  • master
  • 2.3-wiki
  • 2.4-wiki

checkout the new 2.4 branch:

git checkout 2.4-wiki

Modify any files, such as the Home.md to notify users that this is the 2.4 Wiki.

Commit your changes:

git commit -am "Branching Wiki for a 2.4 release"

Once you're done editing the wiki branch, its time to add it as a sub module to the master branch.

cd ../hpi
git submodule add -b 2.4-wiki https://github.com/tsgrp/OpenContent.wiki.git 2.4-wiki

This command takes the 2.4-wiki branch and adds it as a submodule of trunk.

git status shows the newly created submodule (don't forget .gitmodules)

Commit and push and you should now see the new wiki in the master git repository.

Note you'll see a link that looks like this:

2.3-wiki @ a442141

2.3-wiki points to the LATEST/HEAD wiki. But the hash (in this case a442141) points to your feature branch.

Note that this is a particular commit on the feature branch. If you save the link such as:

https://github.com/tsgrp/hpi/wiki/Home/a4421410edad66a1467d774b6ec43c1ca88bf31d

will need to be updated as new commits are made to the 2.4 feature branch of the wiki.

Note

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment