Reputation: 371
So recently I managed to break our entire project (at least on my laptop) with a naive NuGet package installation. Thinking that our CVS is basically Git, I go around looking for a way to do the GUI equivalent of "git checkout -whatever was before things were messed up-"
After much digging and asking, I find an undo button. Naive I use undo on the solution hoping this would at least restore me prior to all the changes I made. Somehow this breaks the project even more.
It feels ridiculous that it should be this difficult. I mean its one small line on a console.
I know our GitHub repository. Is there anyway to clean out the entire project on my laptop and run the equivalent of 'git clone' on it, without somehow messing up that repository? I'm kinda scared that my TFS might be acting clever and updating the repository in responses to what I'd be doing.
Update
It turns out it might just be Git on Visual Studio. If that's the case then fixing things should be simple. I need to know two things 1) How do I clone a project. 2) How do I open a text-prompt where I can enter commands like 'git checkout', 'git branch' etc... and have them work on my solution?
Upvotes: 0
Views: 868
Reputation: 31023
First of all, you need to find out where your repository version controlled, GitHub or TFS.
If the repository is version controlled by TFS, check the steps below to clone your repo:
You need permission to access the repository (contact your administrator to grant your permission).
Connect to TFS in Team Explorer
If you haven't cloned the repo on the machine you use, "Clone this repository" will be prompted. Just clone it on your machine:
If the machine you use have cloned the repo before, you'll see the repo under Solutions section in Team Explorer. Just double click it:
Then you can work on the repo and make version control with TFS.
Of course you can use command line to clone the repo too. You can clone a repository with git clone [url]
. You need specify the URL the repo stored, and the sign in windows will be prompted if the URL requires logon.
Upvotes: 1