Luke Moll
Luke Moll

Reputation: 428

Visual Studio create new solution from existing git repo

I need to create a new solution that has the existing git repo as a remote (not cloned) and pulls from that so that I can start working. Previously I tried blank solution and adding to source control, committing and then adding the remote but I received the error "an upstream branch" (master) "already exists". I'm using Visual Studio Professional 2013. Sorry if this is unclear in any way, I'll be happy to clarify on any details. Thanks in advance

Upvotes: 0

Views: 4526

Answers (2)

quetzalcoatl
quetzalcoatl

Reputation: 33576

I'm sorry if it sounds rough, but I don't find words to make it less blunt.

You misunderstood. There is no way to work on a code from GIT repo without first "cloning" that repository. Even in CVS or SVN you had "working copy". Even with TFS you have the source files on your disk. Basically, this is what GIT calls "cloning": you must download (clone) the files (repository), and then you can open them in IDE and work on them, and then you can commit and send it back to server.

Exact steps depend on the GIT client and IDE you are using. I use VS but I don;t like it's GIT client, and I use GitExtensions+commandline+Explorer integration for that. However, if you want to use the built-in GIT client, here's some tutorial on how to clone&open solution

Upvotes: 2

Denis Vitez
Denis Vitez

Reputation: 648

I think standard practice here would be to just clone the repo and start working ASAP.

Upvotes: 0

Related Questions