github api - What happens to git tag after merging pull request -


what happens if have have git commit tree this:

a-b-c-d          d <-- v0.9 (tag) 

and accept pull request has changes predate commit tagged; tag include commits merged pull request?

a-f-b-g-c-d      d <-- ? v0.9 (tag) 

in git, tag points specific commit object. if you've done git pull --rebase graphs looks this:

a-b-c-d  a-f-b'-g-c'-d' 

the actual commit objects depend on state of tree , parentage, if diff c d exact same diff between c' , d', different commit objects.

so answer question v0.9 tag point version of d when tag first created. if you've rewritten history, have tag points commit no longer in tree current branch.

if, however, mean had committed , pushed branch f b g , c before had pushed b c , d, happens depend on whether merge or rebase when required pull update local branch existing history.

default merge. make graph this:

a-f-b-g-c  \       \   b-c-d---m 

where branch head point m , b , c in each branch of tree different (even if both cherry-picked same commits somewhere else).

update

tl;dr:

  • who committed first (timing) doesn't matter: order depends on graph(s) , options combine and/or alter graphs (merge, rebase, cherry-pick). decide final structure like.
  • commit objects (things tags point to) never change, tagged commit won't updated
  • since commits don't change, when history rewritten, have new commit objects if diffs identical. may things changing replaced in graph looks similar.

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -