{"thread":{"id":"22040","subject":"immutable tags?","startedAt":"2009-12-28T20:04:42Z","lastAt":"2009-12-28T22:22:40Z","messageCount":8,"participants":["Carlos Santana","david@lang.hm","Matthieu Moy","David Kågedal","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"130411","messageId":"92c9564e0912281204h13c6a566w95069023e6909eda@mail.gmail.com","threadId":"22040","inReplyTo":null,"subject":"immutable tags?","fromName":"Carlos Santana","fromEmail":"neubyr@gmail.com","sentAt":"2009-12-28T20:04:42Z","receivedAt":"2009-12-28T20:04:42Z","isPatch":false,"sender":{"key":"neubyr@gmail.com","avatar":null},"body":"I would like to know if there is any difference between branches and\ntags. Is it only conceptual - convention to be followed by a developer\nor some technical difference?  e.g. : Is it possible to create\nimmutable tags so that nothing can be checked in to that 'tagged\ndirectory'?\n\n-\nCS.\n"},{"id":"130412","messageId":"alpine.DEB.2.00.0912281223440.24130@asgard.lang.hm","threadId":"22040","inReplyTo":"92c9564e0912281204h13c6a566w95069023e6909eda@mail.gmail.com","subject":"Re: immutable tags?","fromName":"","fromEmail":"david@lang.hm","sentAt":"2009-12-28T20:25:56Z","receivedAt":"2009-12-28T20:25:56Z","isPatch":false,"sender":{"key":"david@lang.hm","avatar":null},"body":"On Mon, 28 Dec 2009, Carlos Santana wrote:\n\n> I would like to know if there is any difference between branches and\n> tags. Is it only conceptual - convention to be followed by a developer\n> or some technical difference?  e.g. : Is it possible to create\n> immutable tags so that nothing can be checked in to that 'tagged\n> directory'?\n\ntags are pointers into the tree. tags do not change.\n\nin git directories are not tagged, so I'm not sure what you are working \ntowards here.\n\nDavid Lang\n"},{"id":"130418","messageId":"92c9564e0912281239h49f9138ena8bbb3a63a337a55@mail.gmail.com","threadId":"22040","inReplyTo":"alpine.DEB.2.00.0912281223440.24130@asgard.lang.hm","subject":"Re: immutable tags?","fromName":"Carlos Santana","fromEmail":"neubyr@gmail.com","sentAt":"2009-12-28T20:39:53Z","receivedAt":"2009-12-28T20:39:53Z","isPatch":false,"sender":{"key":"neubyr@gmail.com","avatar":null},"body":"Thanks for the reply David.\nI think 'tagged directory' wasn't the appropriate phrase here.\n\nIn Subversion like systems branches and tags are same, i.e., both are\ncreated using 'svn copy'. Branches are generally created for separate\nline of development and tags for releasing software. So developers\nfollow convention of not checking in anything into tags. Otherwise\nthey are same.\n\nI know that creating branches/tags doesn't involve copying files into\nnew directory in case of git. It will act as a pointer and make note\nof changes thereafter. What I am not sure is difference between\nbranches and tags. Is it left to developer to follow subversion like\nconvention or git provides some mechanism to 'lock' tags?\n\n-\nCS.\n\n\n\nOn Mon, Dec 28, 2009 at 2:25 PM,  <david@lang.hm> wrote:\n> On Mon, 28 Dec 2009, Carlos Santana wrote:\n>\n>> I would like to know if there is any difference between branches and\n>> tags. Is it only conceptual - convention to be followed by a developer\n>> or some technical difference?  e.g. : Is it possible to create\n>> immutable tags so that nothing can be checked in to that 'tagged\n>> directory'?\n>\n> tags are pointers into the tree. tags do not change.\n>\n> in git directories are not tagged, so I'm not sure what you are working\n> towards here.\n>\n> David Lang\n>\n>\n"},{"id":"130419","messageId":"vpqzl524y02.fsf@bauges.imag.fr","threadId":"22040","inReplyTo":"92c9564e0912281204h13c6a566w95069023e6909eda@mail.gmail.com","subject":"Re: immutable tags?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2009-12-28T20:58:05Z","receivedAt":"2009-12-28T20:58:05Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Carlos Santana <neubyr@gmail.com> writes:\n\n> I would like to know if there is any difference between branches and\n> tags. Is it only conceptual - convention to be followed by a developer\n> or some technical difference?  e.g. : Is it possible to create\n> immutable tags so that nothing can be checked in to that 'tagged\n> directory'?\n\nA tag is just a named reference to a particular commit (or other\nobject indeed). Once you set a tag, it doesn't move (unless you\noverride it explicitely).\n\nYou can't prevent people from commiting something. It won't move the\ntag, but it will create a new commit whose parent is the tagged\ncommit.\n\nA branch is also a named reference to a commit, but the difference is\nthat when you commit, the current branch is updated (i.e. the\nreference points to the new commit).\n\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"130420","messageId":"alpine.DEB.2.00.0912281311030.24130@asgard.lang.hm","threadId":"22040","inReplyTo":"92c9564e0912281239h49f9138ena8bbb3a63a337a55@mail.gmail.com","subject":"Re: immutable tags?","fromName":"","fromEmail":"david@lang.hm","sentAt":"2009-12-28T21:15:39Z","receivedAt":"2009-12-28T21:15:39Z","isPatch":false,"sender":{"key":"david@lang.hm","avatar":null},"body":"On Mon, 28 Dec 2009, Carlos Santana wrote:\n\n> Thanks for the reply David.\n> I think 'tagged directory' wasn't the appropriate phrase here.\n>\n> In Subversion like systems branches and tags are same, i.e., both are\n> created using 'svn copy'. Branches are generally created for separate\n> line of development and tags for releasing software. So developers\n> follow convention of not checking in anything into tags. Otherwise\n> they are same.\n>\n> I know that creating branches/tags doesn't involve copying files into\n> new directory in case of git. It will act as a pointer and make note\n> of changes thereafter. What I am not sure is difference between\n> branches and tags. Is it left to developer to follow subversion like\n> convention or git provides some mechanism to 'lock' tags?\n\ngit works very differently than subversion. All of git history is a \nbranching tree of commits, all that a tag is is a pointer to a particular \ncommit somewhere in this tree. it does not have the be the most recent \ncommit on the branch.\n\nall branches are (pretty much) equal, you can commit and do development on \nany branch.\n\nas you say above, branches are seperate lines of development and tags can \npoint at releases, but when you have a branch that you are doing \ndevelopment on, you don't have to stop doing development there when you do \na release, anyone who checks out the tag will get the same thing no matter \nwhat additional development you do on that branch in the future.\n\ndoes this help?\n\nDavid Lang\n\n> -\n> CS.\n>\n>\n>\n> On Mon, Dec 28, 2009 at 2:25 PM,  <david@lang.hm> wrote:\n>> On Mon, 28 Dec 2009, Carlos Santana wrote:\n>>\n>>> I would like to know if there is any difference between branches and\n>>> tags. Is it only conceptual - convention to be followed by a developer\n>>> or some technical difference?  e.g. : Is it possible to create\n>>> immutable tags so that nothing can be checked in to that 'tagged\n>>> directory'?\n>>\n>> tags are pointers into the tree. tags do not change.\n>>\n>> in git directories are not tagged, so I'm not sure what you are working\n>> towards here.\n>>\n>> David Lang\n>>\n>>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>"},{"id":"130421","messageId":"87d41yvlpm.fsf@krank.kagedal.org","threadId":"22040","inReplyTo":"92c9564e0912281204h13c6a566w95069023e6909eda@mail.gmail.com","subject":"Re: immutable tags?","fromName":"David Kågedal","fromEmail":"davidk@lysator.liu.se","sentAt":"2009-12-28T21:21:25Z","receivedAt":"2009-12-28T21:21:25Z","isPatch":false,"sender":{"key":"davidk@lysator.liu.se","avatar":"https://avatars.githubusercontent.com/u/60530?v=4"},"body":"Carlos Santana <neubyr@gmail.com> writes:\n\n> I would like to know if there is any difference between branches and\n> tags. Is it only conceptual - convention to be followed by a developer\n> or some technical difference?  e.g. : Is it possible to create\n> immutable tags so that nothing can be checked in to that 'tagged\n> directory'?\n\nYou are always in full control of your own repository, and have no\ncontrol over what other people do with their's. So you can't prevent\nother people from changing the tags in their private repos, but you can\nprevent them from propagating these changes back to you, or to a central\nrepository you control.\n\nBut perhaps there is nothing to worry about. I think the git commands\nwon't modify a tag unless you force it.\n\nAlso, if you use signed tags, you can be sure that they are not silently\nreplaced while still claiming to be tagged by you.\n\n-- \nDavid Kågedal\n"},{"id":"130425","messageId":"m38wcmd9is.fsf@localhost.localdomain","threadId":"22040","inReplyTo":"92c9564e0912281204h13c6a566w95069023e6909eda@mail.gmail.com","subject":"Re: immutable tags?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-12-28T22:22:34Z","receivedAt":"2009-12-28T22:22:34Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Carlos Santana <neubyr@gmail.com> writes:\n\n> I would like to know if there is any difference between branches and\n> tags. Is it only conceptual - convention to be followed by a developer\n> or some technical difference?  e.g. : Is it possible to create\n> immutable tags so that nothing can be checked in to that 'tagged\n> directory'?\n\nThere is difference.  You can commit only on top of local branches, in\nthe refs/heads/* namespace (or on top of detached HEAD).\n\nFor branches:\n\n  $ git checkout A   # switches current branch, HEAD points to A\n  $ git commit       # creates new commit on branch A, A advances (changes)\n\n  * by default fetch gets all branches\n  * by default push transfers matching branches\n  * default refspec is refs/heads/*:refs/remotes/origin/*\n\nFor tags:\n\n  $ git checkout B   # detaches HEAD, HEAD points directly to B^{} commit\n                     # you are on 'no branch'\n  $ git commit       # advances HEAD, tag B does not change\n\n  * by default fetch autofollows tags (gets tags that point to commits\n    you have)\n  * you need to push tags explicitely\n  * default refspec is refs/tags/*:refs/tags/* (mirror 1:1)\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"130426","messageId":"92c9564e0912281422h1a69b5b7u15090f91327c237e@mail.gmail.com","threadId":"22040","inReplyTo":"87d41yvlpm.fsf@krank.kagedal.org","subject":"Re: immutable tags?","fromName":"Carlos Santana","fromEmail":"neubyr@gmail.com","sentAt":"2009-12-28T22:22:40Z","receivedAt":"2009-12-28T22:22:40Z","isPatch":false,"sender":{"key":"neubyr@gmail.com","avatar":null},"body":"Got it now.\nThank you all for explanation...\n\n-\nCS.\n\n\nOn Mon, Dec 28, 2009 at 3:21 PM, David Kågedal <davidk@lysator.liu.se> wrote:\n> The following message is a courtesy copy of an article\n> that has been posted to gmane.comp.version-control.git as well.\n>\n> Carlos Santana <neubyr@gmail.com> writes:\n>\n>> I would like to know if there is any difference between branches and\n>> tags. Is it only conceptual - convention to be followed by a developer\n>> or some technical difference?  e.g. : Is it possible to create\n>> immutable tags so that nothing can be checked in to that 'tagged\n>> directory'?\n>\n> You are always in full control of your own repository, and have no\n> control over what other people do with their's. So you can't prevent\n> other people from changing the tags in their private repos, but you can\n> prevent them from propagating these changes back to you, or to a central\n> repository you control.\n>\n> But perhaps there is nothing to worry about. I think the git commands\n> won't modify a tag unless you force it.\n>\n> Also, if you use signed tags, you can be sure that they are not silently\n> replaced while still claiming to be tagged by you.\n>\n> --\n> David Kågedal\n>\n"}]}