One of my team's created a new folder under a team project and using it as a separate project in tfs 2015.
Is it possible to move that sub folder project to a new project in the same collection?.
Thanks in advance!.
You can use tf rename command to move the path of a file or folder without losing the source control history.
tf rename "$/PROJECT/Sub folder/*.*" "$/NEW PROJECT/XX/"
Note: The results of this command are not reflected in the Team Foundation version control server until you perform a check-in
operation.
Required Permissions
To use the rename command, you have the Check out permission set to
Allow.
Related
Im using VS 2013 (CE).
Windows Server 2012 with a local install of Azure DevOps.
I can connect to the repository via the URL
http://example.local/DefaultCollection
Under defaultCollection i have another few test projects i.e.
/DefaultCollection/A-Project,
/DefaultCollection/B-Project.
For this example i will user C-Project which im trying to add to source control.
All im trying to do is add a project to this source control but i am experiencing issues that i would have thought shouldnt exist:
In VS2013, I add a new solution. I right click the project and select "Add solution to source control". Immediately it selects the project A-Project with the path /DefaultCollection/A-Project/C-Project. I dont want this as it resides inside another project.
From the web portal i create a new project and select Team Foundation Server (not Git as the examples online i have seen all select Git). In VS i create a brand new project and then attempt the same as 1 above but it tells me that i already have a project with this name under source control. I expand A-Project and i see it listed and undo any changes but it still doesnt add as i get some form of error.
Other problems range from the local version not mapped to, existing file exists/under source control to other errors.
What is the correct process to add a project to Azure Devops when using Visual Studio 2013 CE?
The default steps are described here: Set up Team Foundation Version Control on your dev machine.
You have to:
Create a workspace from the target project.
Copy your project into the locally mapped folder.
Add your project to the source control.
As workaround:
Create workspace from the target project: Create and work with workspaces
Copy your project into the locally mapped folder.
Add your project to the source control by: Manually add files to version control
Open the project and fix source control bindings:
Useful document: Add files to the server
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.
I'm writing code in a TFS 2013 Project. I'd like to check it into a different Project on the same server. Can I do this? Thanks
You can not directly check in the code to another project, you need to add the code file to another project first for source control, then check in the code changes.
In visual studio Team Explorer:
Connect To TFS project 1, configure the workspace and map source
code to local folder1. Open the folder1 in windows explorer.
Connect To project 2, configure the workspace and map source code to
local folder2. Open the folder2 in windows explorer.
Copy the code file which you want to check into another project (eg,
project 2 here ) from folder1 to folder2, then the system
will detected the new added files under Pending Changes >
Excluded changes.
Click the Detected link to Promote the new added files.
Check in the files to Project 2
Refer to these articles for more information : Add files to the server
and Check in your work to the team's codebase
UPDATE:
You can link to the WI in the same collection, but cannot link to the WI which in another collection.
That means, if the team projects are in the same collection, then you can link the WI (associate with the changeset) which belongs to another project directly.
I'm an experienced SVN user getting used to TFS at a new client site. The main problem I've had adjusting to the new tool is this - how can I get a listing of all files in my working copy that have changed from current/latest server revision, including added or deleted files?
Essentially, I'm looking for the TFS equivalent of an "svn diff". The "TF" command-line tool has a "diff" command which reports changed files but I can't find an option to report deleted or added files; this missing feature has resulted in a couple check-ins which (embarrassingly) broke the build.
Which version of TFS?
TFS2010 has a folder compare command, File > Source Control > Compare... (or in the Source Control Explorer, right-click on the project path you're interested in, and select Compare...).
Set up the Source path to be a folder on the server and the Target path to be a local folder in your workspace (or vice versa). Under View Options, select Show items that exist only in source path, Show items that exist only in target path and Show items that are different and click OK.
Is there any reason you can't use the Source Control Explorer?
If you right click on the folder, project or branch you can click Compare and you will see all files that have been deleted or added.
I usually do the following:
Open your Team Explorer tab in Visual Studio and click on Pending Changes.
There you will see your changed files.
I have a solution say it Myproject in vs2010. I have create a solution folder on TFS say it $/Myproject and checked in all source code files.
Now I have created another folder on TFS say it $/Myproject2 and I want to the solution Myproject in VS 2010 to connect to $/Myporject2.
I guess I should disconnect from TFS and then connect to $/Myproject2 and check in all codes, but not sure how.
So I try to go to workspace->Edit Wokrspace, and change the Source Control Folder in the list. Is it right?
Thanks.
Map your workspace to $/ and you'll be able to access both $/Myproject and $/Myproject2
However, I don't recommend having one team project be able to reference another team project. If you're going to have these types of dependencies, I would have a layout more like this:
$/MySolution
MyProject
Project.csproj
MyProject2
Project2.csproj
Where "MySolution" is the master product you are trying to build.