I successfully cloned a TFS repository, but git log still shows HEAD pointing to both master and tfs/default as follows:
(HEAD -> master, tfs/default)
I already tried the filter-branch command, as well as remove the [tfs], [git-tfs] sections from configfile and run the following commands:
git reflog expire --all
git gc --aggressive --prune
git tfs cleanup
git tfs cleanup-workspace
But it's still there. The only thing that works is deleting the .git folder then running git init but of course this loses all history. I also checked git config --list --show-all but there is no remote TFS repository in there.
Question
Is it possible to completely disconnect TFS from the git repo without losing history after using git-tfs and if yes, how?
EDIT
The accepted answer works and is instructive but see this answer on SuperUser for what I understand is a 'safer' way to do this.
Your git repo is not "connected" to the TFS server. It just contains some data the allow git-tfs to be able to interact with the TFVC source control.
What you see
tfs/defaultis a pseudo git remote branch to keep track of the last changeset retrieved.As it is stored as a git remote, the easier is to delete the file:
.git/refs/remotes/tfs/defaultNote: if you can't find this file, this is because there is a possibility that the ref is packed in the file
.git/packed-refs. If there, delete the line corresponding torefs/remotes/tfs/default