Action to take when remote branch is moved?
See original GitHub issueFirst off, I apologize if this is the incorrect medium to bring this up.
Somebody decided it would be a great idea to re-organize the folders on our TFS server such that the location to which my git-tfs remote is currently pointing no longer exists. As such, I can no longer commit or shelve. Additionally, pulling just results in a repository with no files.
Is there a way to resolve this without re-cloning and replicating the un-committed work on the new repo?
I tried setting the ‘tfs-remote.default.repository’ config value to point at the new location, but that didn’t seem to get me much closer - if I issue the ‘git tfs branch’ command, I get the following output:
[master]> git tfs branch
Git-tfs remote details:
default -> http://mytfsinstance:8080/tfs $/New/Path/To/Main
Unable to locate a remote for <http://mytfsinstance:8080/tfs>$/Old/Path/To/Main
You may be able to resolve this problem.
- Try using `git tfs bootstrap` to auto-init TFS remotes.
- Try setting a legacy-url for an existing remote.
So I’m wondering - is there a good way to ‘move’ where the git-tfs remote is pointing?
git-tfs version 0.19.1.0 (TFS client library 12.0.0.0 (MS)) (32-bit)
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (4 by maintainers)
@pmiossec this was a tremendously helpful thread after trying several other ways to continue cloning from a fixed commit. Adding an empty commit “Renamed branch ProductName to master” with a git-tfs-id of the new URL and the changeset number and editing
.git/config
worked.@jnm2 Thanks for the follow-up