Mirror FTP changes to local code with VS-2015 - tfs

I've managed to edit sites through ftp connection in Visual Studio 2015 Professional version. How would I go about having those saved changes I make in the ftp Connection be mirrored in my local file system in a version control type of way?
(I've tried opening the site and then right clicking to select team foundation version control, this does not work)

If the files that you want to version-controlled have been added into TFS, you just need to create a workspace and map it with TFS. Then you can get all files from TFS.

Related

How to get changes from other users in VS Code from TFS

This question is for building Angular application in VS Code.
My team has been coding in VS2015 and using Microsoft TFS for version control (Please note that our code is within the company firewall, on a local TFS build server and not on Gits repository). For Angular, I installed VS Code and Azure Repos plugin for TFS.
Once Work-space is setup, I can see the files (I downloaded the files from VS2015 on local machine) but they all show as "Untracked" changes - why? These are checked in files.
Also, when a colleague checks-in files from their VS Code instance, my VS Code doesn't get it.
What is that I am missing here?
I figured out the issue (or a workaround). Posting my solution for any newbie facing the same issue:
Please note that my code is not in GITS or any remote repository, it is in Team Server hosted in the company data center.
I have a workspace created in VS2015 via which I mapped my Angular code and downloaded it on local machine.
VS Code Settings:
Make sure you have Azure Repos extension installed.
Go to File->Preferences->Settings (make sure User settings tab is selected)-> Extensions-> Azure Repos extension:
Provide the values for following fields:
(a) Tfvc: Location Example value for VS2015: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\tf.exe
(b) Tfvc: Proxy
Example (this should be your team server name): https://dataCenter.myCompany.com:9100/tfs
(c) Tfvc: Restrict Workspace (this is optional, use only if needed)
Check the box
Goto View->Command Palette-> type Team: Signin, provide username and password.
Goto File->Open folder-> select the folder mapped via VS2015.
Once the folder is open, you will see all files inside the folder. Go to File->Save Workspace As and give it a name.
Now you should be able to see any changes done by you in either VS2015 or VS code. Check-in should reflect the changes for you and other users connected to the code.
Previous Mistake: I realized that I was using Gits:Initialize Repository (as advised on various sites) which was causing all the trouble of "Untracked" changes and other users' changes not reflecting in my code.
Thanks,
RDV

When connecting to a project in TFS block local repo

In Visual Studio 2017, How do you connect to a TFVC project in TFS and prevent it from creating a local repo? I want to be able to copy files from another project in VS 2017 and check-in but not have all the files from that project local?
In the source control explorer, drill down to the project folder you want to add the files to, right click on the folder (you don't have to have it checked out) and click "Add items to Folder".
You should see an "Add to source control" dialog that is showing files from your local computer. From there, it's not too hard to follow.
When you connect to a TFVC project in TFS you could select to create local workspace or not. But we could not restrict users to create local repo or not.
If you do not want others to pull files from server to local, you need to use permissions to do the restriction.
You could directly copy files from another project to your local workspace, VS will auto detect changes and list in the pending change list. You just need to check in files.
More ways about how to add files to the server, please review this official tutorial.

Checking in uninded code to tfs

I was working on a project in visual studio 2015
Forgot to checkin the code
We installed a new tfs site
Now when I open the code from my hard drive I get the message that the tfs server cannot be found.
My issue is, when I use manage connections to connect to the project, the solution gets closed. When I reopen the solution from the hard drive, the connection to tfs is lost. Is there a sequence I need to follow to get this right?
Connect to new TFS in VS
Open Source Control Explorer and map
the TFS folder to your existing local folder
Check out for edit
on changed files
Check in files
Everything should be working
It seems the project is source controlled by the previous TFS. Try to open the project, go to File--Source Control--Advanced--Change Source Control, and Unbind the solution and projects.

TFS Server 2012 and Promoting changes

I started using TFS Team explorer 2012 and happen to notice a new process called promoting. As I understand it, the Team Explorer detect any changes made to the files outside of the TFS explorer and count them for promotion? Am I right?
How do I take care of the situation where I made a change to the file which is already checked out through TFS, then made a change via Windows Explorer\Notepad but dont want to include the changes made through the Windows Explorer\Notepad.
This is a new feature of TFS 2012 called Local Workspaces.
You are correct in that changes made outside of visual studio can be included in the check-in by promoting them, if they are not already under source control.
If they are already in source control and you do not want to commit them, then you would need to right click the file and choose Exclude. This will move the file from Included Changes into Excluded Changes.
If you do not like the new Local Workspaces you can tell TFS to go back to the old model of Server Workspaces:
Open Team Explorer
Go to Settings
Under Team Project Collection select Source Control
Click the Workspace Settings Tab
Here you can choose the workspace type.
While everything that discens said is correct, one thing bears explicit mention: there is no change to the level of granularity of Team Foundation Server. You still check out files and edit files and check-in files.
In your example, if you have a file checked out and you edit it in Notepad, the changes will be checked in. There is no change here from previous behaviors. There is no way to keep these changes from being checked in, short of saving the file with a different file name.

Rename local path of team foundation server project (TFS 2010)

I have made a "get latest version" on a team foundation server project. I think (not sure) this has
produced a local workspace on my computer where it has put all the files. Now
I want to rename the local path. Can I just do this in windows explorer or will it
cause any problems in TFS?
If you are using TFS 2010 then it will not cause any problems for TFS. TFS will not see the files that were previously pulled down to your work space since you moved them. It would be as if you deleted the files locally.
However, if you are using TFS 2012 then you might run into unattended consequences based on the new local work space feature since it lets you make edits while being offline and disconnected from TFS. Still though if you are renaming the folder you should be fine.
TFS 2012 - local work spaces

Resources