Skip to contentSkip to conversation

how to clean up remote/ref

DISCUSSION bill lam 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore

bill lam

author
#0 lore raw

When I migrated from svn to git, I keep updating svn repo and also added a dummy git repo, Now the GIT_DIR/config look likes

[core]
repositoryformatversion = 0 filemode = true
bare = false
logallrefupdates = true
[svn-remote "svn"]
url = http://localhost/svn/project2/
fetch = :refs/remotes/trunk
[remote "origin"]
url = http://bl@localhost/git-repo/project/
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

Now I feel I don't need update the svn repo (actually it was inactive for more than 1 year after a few updates). Also I no longer want to use http protocol to remote git repo.

It said the HEAD is different that orgin/master

$ git checkout master
Switched to branch "master"
Your branch and 'origin/master' have diverged,
and have 71 and 24 different commit(s) each, respectively.

How do it
1. remove any reference to the svn repo [svn-remote "svn"]
2. remove reference to the http [remote "origin"]
3. setup a new empty git as the new remote repos

thanks

Signature · 6 lines
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩277 柳中庸  征人怨
    歲歲金河復玉關  朝朝馬策與刀環  三春白雪歸青塚  萬里黃河繞黑山