git - Find the branch of a commit on github -


i want find out branches commit belongs on github unlike of commits, 1 not display branch on github

a) enter image description here b) enter image description here cloned repository, and ran git branch --contains <commitid> locally, got error: no such commit

however, on github can navigate commit passing <commitid> in url think contradict error got earlier...

i suspect branch deleted (i not sure remote branch deletion, think ref removed , commits left untouched?)...and commit not reachable (ignored when git clone locally?)

if how can find more information these "zombie commits"? if wrong, happened? maybe git revert?

a pull request not branch, marker says "i want merge feature branch other branch".

what has happened here is:

  1. someone created branch.
  2. a pull request created merge branch.
  3. the branch merged without use of --no-ff, , deleted.
  4. then cloned.

since commits now-deleted branch unreachable, git doesn't bother send them when clone. since haven't yet been garbage collected on remote, can still see them when navigate using url on github (an operation equivalent git show <somehash>).

use of merge commit (such via --no-ff) prevent "original" commit becoming unreachable when merge. rebase-then-merge leads hashes changing, no merge commits - people don't clutter merge commits.

you find history of branch got merged contains identical commit different hash. not believe there way "clone-with-junk" that'd include commit. git commit --mirror closest, gets refs....


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -