* immutable tags?
@ 2009-12-28 20:04 Carlos Santana
2009-12-28 20:25 ` david
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Carlos Santana @ 2009-12-28 20:04 UTC (permalink / raw)
To: git
I would like to know if there is any difference between branches and
tags. Is it only conceptual - convention to be followed by a developer
or some technical difference? e.g. : Is it possible to create
immutable tags so that nothing can be checked in to that 'tagged
directory'?
-
CS.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: immutable tags?
2009-12-28 20:04 immutable tags? Carlos Santana
@ 2009-12-28 20:25 ` david
2009-12-28 20:39 ` Carlos Santana
2009-12-28 20:58 ` Matthieu Moy
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: david @ 2009-12-28 20:25 UTC (permalink / raw)
To: Carlos Santana; +Cc: git
On Mon, 28 Dec 2009, Carlos Santana wrote:
> I would like to know if there is any difference between branches and
> tags. Is it only conceptual - convention to be followed by a developer
> or some technical difference? e.g. : Is it possible to create
> immutable tags so that nothing can be checked in to that 'tagged
> directory'?
tags are pointers into the tree. tags do not change.
in git directories are not tagged, so I'm not sure what you are working
towards here.
David Lang
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: immutable tags?
2009-12-28 20:25 ` david
@ 2009-12-28 20:39 ` Carlos Santana
2009-12-28 21:15 ` david
0 siblings, 1 reply; 8+ messages in thread
From: Carlos Santana @ 2009-12-28 20:39 UTC (permalink / raw)
To: david; +Cc: git
Thanks for the reply David.
I think 'tagged directory' wasn't the appropriate phrase here.
In Subversion like systems branches and tags are same, i.e., both are
created using 'svn copy'. Branches are generally created for separate
line of development and tags for releasing software. So developers
follow convention of not checking in anything into tags. Otherwise
they are same.
I know that creating branches/tags doesn't involve copying files into
new directory in case of git. It will act as a pointer and make note
of changes thereafter. What I am not sure is difference between
branches and tags. Is it left to developer to follow subversion like
convention or git provides some mechanism to 'lock' tags?
-
CS.
On Mon, Dec 28, 2009 at 2:25 PM, <david@lang.hm> wrote:
> On Mon, 28 Dec 2009, Carlos Santana wrote:
>
>> I would like to know if there is any difference between branches and
>> tags. Is it only conceptual - convention to be followed by a developer
>> or some technical difference? e.g. : Is it possible to create
>> immutable tags so that nothing can be checked in to that 'tagged
>> directory'?
>
> tags are pointers into the tree. tags do not change.
>
> in git directories are not tagged, so I'm not sure what you are working
> towards here.
>
> David Lang
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: immutable tags?
2009-12-28 20:04 immutable tags? Carlos Santana
2009-12-28 20:25 ` david
@ 2009-12-28 20:58 ` Matthieu Moy
2009-12-28 21:21 ` David Kågedal
2009-12-28 22:22 ` Jakub Narebski
3 siblings, 0 replies; 8+ messages in thread
From: Matthieu Moy @ 2009-12-28 20:58 UTC (permalink / raw)
To: Carlos Santana; +Cc: git
Carlos Santana <neubyr@gmail.com> writes:
> I would like to know if there is any difference between branches and
> tags. Is it only conceptual - convention to be followed by a developer
> or some technical difference? e.g. : Is it possible to create
> immutable tags so that nothing can be checked in to that 'tagged
> directory'?
A tag is just a named reference to a particular commit (or other
object indeed). Once you set a tag, it doesn't move (unless you
override it explicitely).
You can't prevent people from commiting something. It won't move the
tag, but it will create a new commit whose parent is the tagged
commit.
A branch is also a named reference to a commit, but the difference is
that when you commit, the current branch is updated (i.e. the
reference points to the new commit).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: immutable tags?
2009-12-28 20:39 ` Carlos Santana
@ 2009-12-28 21:15 ` david
0 siblings, 0 replies; 8+ messages in thread
From: david @ 2009-12-28 21:15 UTC (permalink / raw)
To: Carlos Santana; +Cc: git
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2296 bytes --]
On Mon, 28 Dec 2009, Carlos Santana wrote:
> Thanks for the reply David.
> I think 'tagged directory' wasn't the appropriate phrase here.
>
> In Subversion like systems branches and tags are same, i.e., both are
> created using 'svn copy'. Branches are generally created for separate
> line of development and tags for releasing software. So developers
> follow convention of not checking in anything into tags. Otherwise
> they are same.
>
> I know that creating branches/tags doesn't involve copying files into
> new directory in case of git. It will act as a pointer and make note
> of changes thereafter. What I am not sure is difference between
> branches and tags. Is it left to developer to follow subversion like
> convention or git provides some mechanism to 'lock' tags?
git works very differently than subversion. All of git history is a
branching tree of commits, all that a tag is is a pointer to a particular
commit somewhere in this tree. it does not have the be the most recent
commit on the branch.
all branches are (pretty much) equal, you can commit and do development on
any branch.
as you say above, branches are seperate lines of development and tags can
point at releases, but when you have a branch that you are doing
development on, you don't have to stop doing development there when you do
a release, anyone who checks out the tag will get the same thing no matter
what additional development you do on that branch in the future.
does this help?
David Lang
> -
> CS.
>
>
>
> On Mon, Dec 28, 2009 at 2:25 PM, <david@lang.hm> wrote:
>> On Mon, 28 Dec 2009, Carlos Santana wrote:
>>
>>> I would like to know if there is any difference between branches and
>>> tags. Is it only conceptual - convention to be followed by a developer
>>> or some technical difference? e.g. : Is it possible to create
>>> immutable tags so that nothing can be checked in to that 'tagged
>>> directory'?
>>
>> tags are pointers into the tree. tags do not change.
>>
>> in git directories are not tagged, so I'm not sure what you are working
>> towards here.
>>
>> David Lang
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: immutable tags?
2009-12-28 20:04 immutable tags? Carlos Santana
2009-12-28 20:25 ` david
2009-12-28 20:58 ` Matthieu Moy
@ 2009-12-28 21:21 ` David Kågedal
2009-12-28 22:22 ` Carlos Santana
2009-12-28 22:22 ` Jakub Narebski
3 siblings, 1 reply; 8+ messages in thread
From: David Kågedal @ 2009-12-28 21:21 UTC (permalink / raw)
To: git
Carlos Santana <neubyr@gmail.com> writes:
> I would like to know if there is any difference between branches and
> tags. Is it only conceptual - convention to be followed by a developer
> or some technical difference? e.g. : Is it possible to create
> immutable tags so that nothing can be checked in to that 'tagged
> directory'?
You are always in full control of your own repository, and have no
control over what other people do with their's. So you can't prevent
other people from changing the tags in their private repos, but you can
prevent them from propagating these changes back to you, or to a central
repository you control.
But perhaps there is nothing to worry about. I think the git commands
won't modify a tag unless you force it.
Also, if you use signed tags, you can be sure that they are not silently
replaced while still claiming to be tagged by you.
--
David Kågedal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: immutable tags?
2009-12-28 20:04 immutable tags? Carlos Santana
` (2 preceding siblings ...)
2009-12-28 21:21 ` David Kågedal
@ 2009-12-28 22:22 ` Jakub Narebski
3 siblings, 0 replies; 8+ messages in thread
From: Jakub Narebski @ 2009-12-28 22:22 UTC (permalink / raw)
To: Carlos Santana; +Cc: git
Carlos Santana <neubyr@gmail.com> writes:
> I would like to know if there is any difference between branches and
> tags. Is it only conceptual - convention to be followed by a developer
> or some technical difference? e.g. : Is it possible to create
> immutable tags so that nothing can be checked in to that 'tagged
> directory'?
There is difference. You can commit only on top of local branches, in
the refs/heads/* namespace (or on top of detached HEAD).
For branches:
$ git checkout A # switches current branch, HEAD points to A
$ git commit # creates new commit on branch A, A advances (changes)
* by default fetch gets all branches
* by default push transfers matching branches
* default refspec is refs/heads/*:refs/remotes/origin/*
For tags:
$ git checkout B # detaches HEAD, HEAD points directly to B^{} commit
# you are on 'no branch'
$ git commit # advances HEAD, tag B does not change
* by default fetch autofollows tags (gets tags that point to commits
you have)
* you need to push tags explicitely
* default refspec is refs/tags/*:refs/tags/* (mirror 1:1)
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: immutable tags?
2009-12-28 21:21 ` David Kågedal
@ 2009-12-28 22:22 ` Carlos Santana
0 siblings, 0 replies; 8+ messages in thread
From: Carlos Santana @ 2009-12-28 22:22 UTC (permalink / raw)
To: git; +Cc: davidk
Got it now.
Thank you all for explanation...
-
CS.
On Mon, Dec 28, 2009 at 3:21 PM, David Kågedal <davidk@lysator.liu.se> wrote:
> The following message is a courtesy copy of an article
> that has been posted to gmane.comp.version-control.git as well.
>
> Carlos Santana <neubyr@gmail.com> writes:
>
>> I would like to know if there is any difference between branches and
>> tags. Is it only conceptual - convention to be followed by a developer
>> or some technical difference? e.g. : Is it possible to create
>> immutable tags so that nothing can be checked in to that 'tagged
>> directory'?
>
> You are always in full control of your own repository, and have no
> control over what other people do with their's. So you can't prevent
> other people from changing the tags in their private repos, but you can
> prevent them from propagating these changes back to you, or to a central
> repository you control.
>
> But perhaps there is nothing to worry about. I think the git commands
> won't modify a tag unless you force it.
>
> Also, if you use signed tags, you can be sure that they are not silently
> replaced while still claiming to be tagged by you.
>
> --
> David Kågedal
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-12-28 22:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-28 20:04 immutable tags? Carlos Santana
2009-12-28 20:25 ` david
2009-12-28 20:39 ` Carlos Santana
2009-12-28 21:15 ` david
2009-12-28 20:58 ` Matthieu Moy
2009-12-28 21:21 ` David Kågedal
2009-12-28 22:22 ` Carlos Santana
2009-12-28 22:22 ` Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).