[git-users] why git need branches?

2011-08-23 Thread pavan kumar
hi everyone,
iam new to git, i have a few doubts.

why git uses branches to work on and why it creates a default branch
master?

can anyone give this information?


regards,
pavan kumar.

-- 
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-users@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.



Re: [git-users] why git need branches?

2011-08-23 Thread Konstantin Khomoutov
On Tue, 23 Aug 2011 04:47:32 -0700 (PDT)
pavan kumar nagubandi...@gmail.com wrote:

 why git uses branches to work on
Git does not need branches, a programmer is free to completely ignore
the fact branches exist.

 and why it creates a default branch master?
Since Git supports branches, every repository must have one (initial)
branch.  The name master has no special meaning except that it's how
Git names the default branch when it initializes a new repository.

 can anyone give this information?
Start with The Git Parable [1] then move on to Git books and
HOWTOs [2]. The Pro Git book listed there is freely available online.

1. http://tom.preston-werner.com/2009/05/19/the-git-parable.html
2. http://www.git-scm.com/documentation

-- 
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-users@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.



[git-users] Re: git tag -l - where are the associated

2011-08-23 Thread Phlip
  for x in $(git tag -l); do
     echo $x\t$(git rev-parse $x)
  done

BTW that turns out to be:

  git show-ref --tags

Awesome bash bashing, though!

Now I'm still trying to go from a hashtag to a tag. I'll see if I can
follow up when I find it - it should be easy, right?

  git show-ref --tags | grep de049647a1ea285ce7791dc4ebf01ddfc564ddad

 --
  Phlip
  http://c2.com/cgi/wiki?ZeekLand

-- 
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-users@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.



Re: [git-users] Re: git tag -l - where are the associated

2011-08-23 Thread Adam Prescott
On Tue, Aug 23, 2011 at 6:43 PM, Phlip phlip2...@gmail.com wrote:

 Now I'm still trying to go from a hashtag to a tag. I'll see if I can
 follow up when I find it - it should be easy, right?

  git show-ref --tags | grep de049647a1ea285ce7791dc4ebf01ddfc564ddad


If the tag is the only ref for that commit, you can use

git name-rev de049647a1ea285ce7791dc4ebf01ddfc564ddad

However, if de049647a1ea285ce7791dc4ebf01ddfc564ddad is also, say, the head
of your master branch, then it might not necessarily pick that tag as the
ref to give back. (I'm unsure how name-rev determines its results.)

If you aren't looking to use it programmatically, you could maybe get away
with

git log --decorate --oneline -1 de049647a1ea285ce7791dc4ebf01ddfc564ddad

Check the man page for name-rev if you want to find out more. It can be
quite useful.

-- 
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-users@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.