Vijay,

If you make 10 commits, then tag the 10th commit, then that tag only applies to 
that last commit.  The tag does not apply to commits 1 through 9, nor does that 
tag apply to an 11th commit.  Just the one.  It's really no different to other 
systems, although it might sounds like it is.  You would expect to tag a 
certain file version, but not the earlier or later version.  Git just doesn't 
do files - it does changesets (commits).

Take a look at this (you could try it yourself):

$ git init tagtest
Initialized empty Git repository in /home/paul/tagtest/.git/
$ cd tagtest
$ date > file
$ git add file
$ git commit -m "zero"
[master (root-commit) 815ce88] zero
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file
$
$ date >> file; git commit -a -m one
[master 921ae3e] one
 1 files changed, 1 insertions(+), 0 deletions(-)
$
$ date >> file; git commit -a -m two
[master 5f30367] two
 1 files changed, 1 insertions(+), 0 deletions(-)
$
$ date >> file; git commit -a -m three
[master b256a7b] three
 1 files changed, 1 insertions(+), 0 deletions(-)
$
$ date >> file; git commit -a -m four
[master 77f0a1b] four
 1 files changed, 1 insertions(+), 0 deletions(-)
$
$git tag -a Vijay -m Vijay 5f30367
$git log --oneline --decorate
77f0a1b (master) four
b256a7b three
5f30367 (tag: Vijay) two
921ae3e one
815ce88 zero

See how the tag only applies to that one (red, highlighted) commit?


> maybe i am asking a basic question, sorry for my ignorance. :-(

No no, absolutely not - this is just how it feels to learn git.

Paul

--

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.


Reply via email to