> Just one more thing to add here. How do i tag the whole content inside my 
> branch? As paul said, if i do 10 commits only the final commit will be 
> tagged. Now for example if i will branch-off from the master branch and start 
> work from there and i want to give a final tag on the branch what i am 
> working till now. Is it possible in GIT ?

Hi Vijay,

Yes, this is possible in git, and easy too.  Here's an example (without the 
response from git, for clarity):

First make a repo, make one commit on master and tag it

$ git init foo
$ cd foo
$ date > file
$ git add file
$ git commit -m one
$ git tag -a FIRST -m FIRST

Now create a branch, two commits, and tag the HEAD of the branch

$ git checkout -b dev
$ date > file; git commit -a -m two
$ sleep 1; date > file; git commit -a -m three
$ git tag -a SECOND -m SECOND

Now look at the log

$ git log --oneline --decorate
f28c7ce (tag: SECOND, dev) three
91dc711 two
db9c558 (tag: FIRST, master) one

Notice the two tags, and the different branches they are on.  Your tree now 
looks like this:

    o master (FIRST)
      o---o dev (SECOND)

> Also how do i see the content inside a commit? if i run "git log " it just 
> shows the commit id and the author.


        $ git log -p

to show you the patches as well as the commit message, committer, sha1 etc.

        $ git show <sha1>

to show you a specific commit with message, committer, sha1 etc.



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 
For more options, visit this group at 

Reply via email to