Title: Initial commit assigned to &quot;Unknown&quot; branch
Last modified: August 24, 2016

---

# Initial commit assigned to "Unknown" branch

 *  Resolved [max_Q](https://wordpress.org/support/users/max_q/)
 * (@max_q)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/initial-commit-assigned-to-unknown-branch/)
 * Hi,
 * On two installations so far, the initial commit is assigned to branch “Unknown”.
   Subsequent commits are assigned to branch “Master”. Pushing the initial commit
   to Bitbucket has it assigned to the master branch (there’s only one branch on
   Bitbucket) and Revisr only shows one branch (master) as well. If find this confusing.
   Is this by design?
 * BTW, I have a what appears to be a bug to report. Do you prefer bug reports here
   or on GitHub?
 * Cheers
 * [https://wordpress.org/plugins/revisr/](https://wordpress.org/plugins/revisr/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/initial-commit-assigned-to-unknown-branch/#post-6004482)
 * Hi,
 * I believe this is because when you first initialize a repo and haven’t made any
   commits, the HEAD for the repo hasn’t been created yet and it’s automatically
   set to that first commit.
 * Looking at this again, I think this could be easily remedied by checking the 
   branch again after the commit, right now it uses the branch cached in memory.
   Will test further and look into including that in next release.
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years ago](https://wordpress.org/support/topic/initial-commit-assigned-to-unknown-branch/#post-6004678)
 * This has been fixed with the latest release. Thanks for the heads up!
 *  Thread Starter [max_Q](https://wordpress.org/support/users/max_q/)
 * (@max_q)
 * [11 years ago](https://wordpress.org/support/topic/initial-commit-assigned-to-unknown-branch/#post-6004691)
 * Another little wrinkle, a database backup I did before the initial commit was
   also assigned to “Unknown”. It’s the first commit in the list on the Commits 
   page, with the commit message “Backed up the database with Revisr.” It’s now 
   the only commit that still says “Unknown”. I’m using version 1.9.5. Just FYI.
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years ago](https://wordpress.org/support/topic/initial-commit-assigned-to-unknown-branch/#post-6004692)
 * That sounds about right. The fix applied in 1.9.5 will only work if you make 
   the initial commit with 1.9.5 – it wasn’t a retroactive fix.
 * For initial commits pre-1.9.5 – the actual commit is set to the correct branch
   in Git – and is still able to be reverted to as long as the commit has a commit
   hash (which it should).
 * The reason behind this is that a branch isn’t technically created in Git until
   you make that first commit, before that it is just the “HEAD” of the repo.
 * Before 1.9.5, Revisr used the info already available before the commit to determine
   which branch you made the commit on (which worked fine for everything except 
   getting the branch of the very first commit).
 * After 1.9.5, Revisr will do an additional check of the branch immediately after
   the commit and use that to update the commit in WordPress.
 * Let me know if you have any further questions/issues, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Initial commit assigned to "Unknown" branch’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/revisr_ecf0f1.svg)
 * [Revisr](https://wordpress.org/plugins/revisr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/revisr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/revisr/)
 * [Active Topics](https://wordpress.org/support/plugin/revisr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/revisr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/revisr/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/initial-commit-assigned-to-unknown-branch/#post-6004692)
 * Status: resolved