immutable tags?

7 messages, 4 authors, 2016-06-15 · open the first message on its own page

immutable tags?

From: Carlos Santana <hidden>
Date: 2016-06-15 22:47:56

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.

Re: immutable tags?

From: <hidden>
Date: 2016-06-15 22:47:56

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

Re: immutable tags?

From: Carlos Santana <hidden>
Date: 2016-06-15 22:47:56

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,  [off-list ref] wrote:
On Mon, 28 Dec 2009, Carlos Santana wrote:
quoted
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

Re: immutable tags?

From: <hidden>
Date: 2016-06-15 22:47:56

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,  [off-list ref] wrote:
quoted
On Mon, 28 Dec 2009, Carlos Santana wrote:
quoted
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

Re: immutable tags?

From: David Kågedal <hidden>
Date: 2016-06-15 22:47:56

Carlos Santana [off-list ref] 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

Re: immutable tags?

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:47:56

Carlos Santana [off-list ref] 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

Re: immutable tags?

From: Carlos Santana <hidden>
Date: 2016-06-15 22:47:56

Got it now.
Thank you all for explanation...

-
CS.


On Mon, Dec 28, 2009 at 3:21 PM, David Kågedal [off-list ref] 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 [off-list ref] writes:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help