git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Simple questions on GIT usage.
@ 2005-11-14 15:46 Franck
  2005-11-14 16:08 ` Andreas Ericsson
  2005-11-14 16:36 ` Franck
  0 siblings, 2 replies; 5+ messages in thread
From: Franck @ 2005-11-14 15:46 UTC (permalink / raw)
  To: Git Mailing List

Hi,

I'd like to know how to delete an entire branch and all it's related
objects. Is the following correct to accomplish that ?

        # rm -f .git/refs/heads/mybranch
        # git-prune

And a second question is: how to get the tree ID of the working
repository ? I know it's very basic but I can't find out the answer in
any documentations.

Thanks
--
               Franck

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple questions on GIT usage.
  2005-11-14 15:46 Simple questions on GIT usage Franck
@ 2005-11-14 16:08 ` Andreas Ericsson
  2005-11-14 16:37   ` Randal L. Schwartz
  2005-11-14 16:36 ` Franck
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Ericsson @ 2005-11-14 16:08 UTC (permalink / raw)
  Cc: Git Mailing List

Franck wrote:
> Hi,
> 
> I'd like to know how to delete an entire branch and all it's related
> objects. Is the following correct to accomplish that ?
> 

man git-branch

It will tell you about its -d and -D options.

> 
> And a second question is: how to get the tree ID of the working
> repository ?


I get a feeling there's a higher-level question behind this one, like 
"How can I get a diff between an updated (but not committed) index and 
the files in the working directory?"

When you have a problem it's usually better to just tell people what 
sort of end-result you're hoping to achieve and what steps you've taken 
to accomplish it so far. Asking for details about something that might 
be wrong thinking from the start won't help you but will still require 
much of our time to answer. I.e. nobody gains anything but the work 
still has to be done.

Incidentally, the answer to the quoted question above is (usually)
	git diff-index -p HEAD

Otherwise;
man git (and look in the "IDENTIFIER TERMINOLOGY". I wish I had).

and

for i in /usr/bin/git-*tree*; do man ${i##*/}; done

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple questions on GIT usage.
  2005-11-14 15:46 Simple questions on GIT usage Franck
  2005-11-14 16:08 ` Andreas Ericsson
@ 2005-11-14 16:36 ` Franck
  1 sibling, 0 replies; 5+ messages in thread
From: Franck @ 2005-11-14 16:36 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Andreas Ericsson

Andreas

Could you cc me when you're responding to my questions since I'm not
subscribed to the GIT mailing list for now...thanks

git-branch -d option is not documented on online documentation at:
http://www.kernel.org/pub/software/scm/git/docs/
That's why I didn't find it by my self...

Regarding the second question, your feeling is wrong.  What you
described is well documented in the git tutorial. There's no "hidden"
question behind the one I posted in my first email. So the question is
still: Is there a way to get information about the working repository
? For instance if I create a branch which is not based on the current
HEAD position of master branch but instead is based on a previous
poisition of master branch.  Then later I want to know how I create
this branch, how can I get this information ?

Thanks
--
               Franck

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple questions on GIT usage.
  2005-11-14 16:08 ` Andreas Ericsson
@ 2005-11-14 16:37   ` Randal L. Schwartz
  2005-11-14 16:56     ` Andreas Ericsson
  0 siblings, 1 reply; 5+ messages in thread
From: Randal L. Schwartz @ 2005-11-14 16:37 UTC (permalink / raw)
  To: Andreas Ericsson

>>>>> "Andreas" == Andreas Ericsson <ae@op5.se> writes:

Andreas> man git-branch

Andreas> It will tell you about its -d and -D options.

It will?  My manpage has no -d or -D option for git-branch.

And I've been looking for something like that too.  If I want to
abandon a what-if branch, how do I make sure that the branch and all
objects are deleted?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple questions on GIT usage.
  2005-11-14 16:37   ` Randal L. Schwartz
@ 2005-11-14 16:56     ` Andreas Ericsson
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Ericsson @ 2005-11-14 16:56 UTC (permalink / raw)
  To: Randal L. Schwartz; +Cc: Git Mailing List

Randal L. Schwartz wrote:
>>>>>>"Andreas" == Andreas Ericsson <ae@op5.se> writes:
> 
> 
> Andreas> man git-branch
> 
> Andreas> It will tell you about its -d and -D options.
> 
> It will?  My manpage has no -d or -D option for git-branch.
> 

Ah. It's the help output that has them. I've submitted a patch to add 
them to the man-page though, so it should show up soonish.

> And I've been looking for something like that too.  If I want to
> abandon a what-if branch, how do I make sure that the branch and all
> objects are deleted?
> 

git branch -D branchname
git prune

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-11-14 16:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 15:46 Simple questions on GIT usage Franck
2005-11-14 16:08 ` Andreas Ericsson
2005-11-14 16:37   ` Randal L. Schwartz
2005-11-14 16:56     ` Andreas Ericsson
2005-11-14 16:36 ` Franck

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).