* Deleting remote branches
@ 2010-06-19 18:17 jhapk
2010-06-20 4:49 ` Jon Seymour
0 siblings, 1 reply; 8+ messages in thread
From: jhapk @ 2010-06-19 18:17 UTC (permalink / raw)
To: git
Hi,
I added a remote called PCM to my repository. So when I do a
$git branch -a
It shows me all the branches of the remote. I decided I don't want the
remote anymore, so I deleted it from my .git/config file and did
$git remote update
The first command verified that PCM is not a remote anymore, but still when
I do a $git branch -a, I see all the branches of PCM.
How do I get rid of it?
Thanks
--
View this message in context: http://git.661346.n2.nabble.com/Deleting-remote-branches-tp5199192p5199192.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Deleting remote branches
2010-06-19 18:17 Deleting remote branches jhapk
@ 2010-06-20 4:49 ` Jon Seymour
0 siblings, 0 replies; 8+ messages in thread
From: Jon Seymour @ 2010-06-20 4:49 UTC (permalink / raw)
To: jhapk; +Cc: git
You probably should have used git remote rm PCM which will maintain
the consistency between .git/config and .git/refs/remotes
Probably easiest thing to do would be to add a remote called PCM back,
then remove it with git remote rm PCM.
jon.
On Sun, Jun 20, 2010 at 4:17 AM, jhapk <pradeep.kumar.jha@gmail.com> wrote:
>
> Hi,
>
> I added a remote called PCM to my repository. So when I do a
> $git branch -a
>
> It shows me all the branches of the remote. I decided I don't want the
> remote anymore, so I deleted it from my .git/config file and did
> $git remote update
>
> The first command verified that PCM is not a remote anymore, but still when
> I do a $git branch -a, I see all the branches of PCM.
>
> How do I get rid of it?
>
> Thanks
>
> --
> View this message in context: http://git.661346.n2.nabble.com/Deleting-remote-branches-tp5199192p5199192.html
> Sent from the git mailing list archive at Nabble.com.
> --
> 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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Deleting remote branches
@ 2010-03-26 5:46 jhapk
2010-03-26 6:00 ` Ramkumar Ramachandra
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: jhapk @ 2010-03-26 5:46 UTC (permalink / raw)
To: git
Hi,
I had a whole bunch of branches in my local and a remote repository. I
deleted all the redundant branches to be left with only three now. So the
result of $git branch on my local repository is
[pradeep@scaramanga cffc]$ git branch
jeff
master
* work
and on the remote directory which is called 'origin' it returns
[pradeep@scaramanga CFFC.git]$ git branch
RANSmodel
* master
work
But when I type the following command on my local branch,
[pradeep@scaramanga cffc]$ git branch -a
jeff
master
* work
origin/HEAD
origin/RANSmodel
origin/bluffbody
origin/counterflow
origin/flamelet
origin/jeff
origin/master
origin/test
origin/work
I still get all these branches which I deleted in my remote 'origin'.
My .git/config file looks like this
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = /nfs/carv/d1/people/pradeep/Repositories/CFFC.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "jeff"]
url = /nfs/kris/d1/people/jeff/cffc
fetch = +refs/heads/pradeep:refs/remotes/jeff/pradeep
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "work"]
remote = origin
merge = refs/heads/work
[push]
default = matching
[branch "jeff"]
remote = jeff
merge = refs/heads/pradeep
Does anyone know why am I still getting branhces like origin/test when I do
$git branch -a
--
View this message in context: http://n2.nabble.com/Deleting-remote-branches-tp4802262p4802262.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Deleting remote branches
2010-03-26 5:46 jhapk
@ 2010-03-26 6:00 ` Ramkumar Ramachandra
2010-03-26 6:09 ` jhapk
2010-03-26 7:10 ` Johannes Sixt
2010-03-26 15:52 ` Chris Packham
2 siblings, 1 reply; 8+ messages in thread
From: Ramkumar Ramachandra @ 2010-03-26 6:00 UTC (permalink / raw)
To: jhapk; +Cc: git
See `git push origin :branchname`. It's a listed example in git-push (1).
-- Ram
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Deleting remote branches
2010-03-26 6:00 ` Ramkumar Ramachandra
@ 2010-03-26 6:09 ` jhapk
2010-03-26 6:16 ` Peter Baumann
0 siblings, 1 reply; 8+ messages in thread
From: jhapk @ 2010-03-26 6:09 UTC (permalink / raw)
To: git
Hi,
I have tried that and I get the following message
[pradeep@scaramanga cffc]$ git push origin:test
error: dst refspec test does not match any existing ref on the remote and
does not start with refs/.
fatal: The remote end hung up unexpectedly
error: failed to push to '/nfs/carv/d1/people/pradeep/Repositories/CFFC.git'
don't know what this means.
--
View this message in context: http://n2.nabble.com/Deleting-remote-branches-tp4802262p4802313.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Deleting remote branches
2010-03-26 6:09 ` jhapk
@ 2010-03-26 6:16 ` Peter Baumann
0 siblings, 0 replies; 8+ messages in thread
From: Peter Baumann @ 2010-03-26 6:16 UTC (permalink / raw)
To: jhapk; +Cc: git
On Thu, Mar 25, 2010 at 10:09:03PM -0800, jhapk wrote:
>
> Hi,
>
> I have tried that and I get the following message
>
> [pradeep@scaramanga cffc]$ git push origin:test
^^^^^^^^^^^
Notice the missing space. From the git push manpage:
git push origin :experimental
^
Find a ref that matches experimental in the origin repository (e.g.
refs/heads/experimental), and delete it.
The syntax (with all the unused stuff removed) is 'git push <repository> <refspec>'
If you don't supply any repository (as you did with your cmdline), the default
remote repository is used. Your command tried to push the local branch 'origin' into
the remote branch 'test' of your default remote repository. Correct would be
git push :test # or git push origin :test
The refspec :test means push empy/nothingness into the branch 'test', which will delete it.
--
Peter
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Deleting remote branches
2010-03-26 5:46 jhapk
2010-03-26 6:00 ` Ramkumar Ramachandra
@ 2010-03-26 7:10 ` Johannes Sixt
2010-03-26 15:52 ` Chris Packham
2 siblings, 0 replies; 8+ messages in thread
From: Johannes Sixt @ 2010-03-26 7:10 UTC (permalink / raw)
To: jhapk; +Cc: git
Am 3/26/2010 6:46, schrieb jhapk:
> I had a whole bunch of branches in my local and a remote repository. I
> deleted all the redundant branches to be left with only three now.
...
> Does anyone know why am I still getting branhces like origin/test when I do
> $git branch -a
git remote prune origin
-- Hannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Deleting remote branches
2010-03-26 5:46 jhapk
2010-03-26 6:00 ` Ramkumar Ramachandra
2010-03-26 7:10 ` Johannes Sixt
@ 2010-03-26 15:52 ` Chris Packham
2 siblings, 0 replies; 8+ messages in thread
From: Chris Packham @ 2010-03-26 15:52 UTC (permalink / raw)
To: jhapk; +Cc: GIT
On Thu, Mar 25, 2010 at 10:46 PM, jhapk <pradeep.kumar.jha@gmail.com> wrote:
>
> Hi,
>
> jeff
> master
> * work
> origin/HEAD
> origin/RANSmodel
> origin/bluffbody
> origin/counterflow
> origin/flamelet
> origin/jeff
> origin/master
> origin/test
> origin/work
> I still get all these branches which I deleted in my remote 'origin'.
>
'git remote prune origin' will clean up the references you have to
branches that no longer exist in origin
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-06-20 4:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-19 18:17 Deleting remote branches jhapk
2010-06-20 4:49 ` Jon Seymour
-- strict thread matches above, loose matches on Subject: below --
2010-03-26 5:46 jhapk
2010-03-26 6:00 ` Ramkumar Ramachandra
2010-03-26 6:09 ` jhapk
2010-03-26 6:16 ` Peter Baumann
2010-03-26 7:10 ` Johannes Sixt
2010-03-26 15:52 ` Chris Packham
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).