Creating a new branch from any commit of a github repository which has a long gone history.

Kasun Siyambalapitiya
2 min readMar 3, 2018
Source: https://wac-cdn.atlassian.com/dam/jcr:83323200-3c57-4c29-9b7e-e67e98745427/Branch-1.png?cdnVersion=jt

There may be times that you need to try something different which is completely off the track of current master (branch). You may want to start a new branch from scratch (from first commit) or diverge from an already existing commit on the same repository. Either way this can be easily achieved by following the simple steps as follows,

  • Log into to your github account.
  • Get the commit history of the relevant repository.
Repository: https://github.com/kasunsiyambalapitiya/carbon-kernel/commits/master
  • Click the button on Browse the repository at this point in the history on the commit which you like to start your new branch with.
Repository: https://github.com/kasunsiyambalapitiya/carbon-kernel/commits/master
  • Then on the top left tree dropdown type in the name you wish call your new branch, then you will be prompted for the creation of a new branch at the selected commit :) .

--

--