I am using TFS 2010.
Recently I created a new project and I created a new source control folder. I checked in the project.
When I looked in source control explorer it says that the project Local Path is set to "Not mapped".
When I look inside the grayed out folder, I can see the code there.
I try to "Add Items to Folder", even though they are already there in Source Control Explorer.
I get an error message:
The path ... is already mapped in workspace ...
How do I fix this?
you have overlapping workspaces. a workspace can not overlap with another one. have a look in the other workspace and see where the overlap occurs. then delete / clean up so that you have a clean workspace / workspaces. it may be easier to add your new mapping to the old workspace and delete the new one
Related
I've accidentally added my solution to wrong Team project on TFS, I've gone to File/Source Control/Advanced/Change source control, I've selected all my projects and unbinded them, went to solution, and after right click I've chosen Add Solution To Source Control, but pop-up appeared saying:
The item 'ProjectName.sln' is already under source control at the selected location.
If you are trying to rebind a project that you have already added to source control
outside Microsoft Visual Studio, you should use the Change Source Control command. If you are
adding this project for the first time, you should either choose a different server folder for the project or move the
existing project to a different server folder.
I've tried to bind project to new Team project, but when I tried to check in, not whole project was checked but only changes added since I've accidentally added it to wrong Team project.
To sum up how can now I add my project to TFS source control ?
You need to unbind it, then manually move the files into a local folder that is mapped to the correct team project. Then try doing the Add Solution to Source Control.
Each team project will be mapped to a different folder in your local workspace. If your files are under the folder for project A (which I assume they are if you've already added it to that team project), then you need to move them to a folder under Project B before trying to bind to Project B.
Normally I just create a new project, select the option to keep it under source control, and everything works.
Today I tried using a workspace, and it doesn't work. Here is what I did:
File->Xcode->New WorkSpace. (Create the workspace in a new folder). hit Save.
File->New Project->iOS->Single View Application->Next
Enter product name etc, Next
Make sure "Create git repository on My Mac" is checked. Select the folder where the workspace is saved. Choose "Add to"->The workspace you created. Hit Create.
Type some stuff into app delegate. Build. Save file.
Try to commit in source control --> Can't! All the options are greyed out. Even though changes are made to app delegate, the "m" symbol does not appear near it.
How do I correctly set up my workspace so I can use source control ? What is wrong with my set up ?
EDIT: Trying to add new files doesn't make the "A" symbol show up near the new files either. Clearly source control isn't on.
If I create a project that isn't part of the workspace, source control works fine.
EDIT: Navigating to the folder directory and running git status , gives the following message:
fatal: Not a git repository (or any of the parent directories): .git
Why wasn't a git repository created ? and how do I get it to work?
EDIT: I deleted my project from the workspace. Closed the workspace. Created the project again outside the workspace. Closed the project. Dragged the project into the workspace, and now the project is both part of he workspace, and it is under source control. Can't tell why it didn't work when I created the project within the workspace.
EDIT: As I don't know the reason why source control didn't work when I created the project within the workspace, I'm leaving this open in case someone has an answer, or knows if it is a known bug.
Looks like your .git directory is not inside the main workspace directory. Enable hidden file view in Finder and see where your .git directory is.
Xcode makes it rather confusing working with workspaces, since it does enforce any logical directory structure.
You can try using IDEs such as AppCode to give you better idea, you can get a free 30 day version of it from JetBrain's website.
When checking in my project I get the error:
Could not find file 'C\blah blah blah'.
I have a feeling this might be a file from an old project I deleted.
I have tried deleting my TFS connection and workspaces.
This will happen when TFS has some changes staged that no longer exist on the file system. For instance, if you add some files in Visual Studio (which adds them to the changes list), delete them directly from the file system, then attempt to check in the changes, it will complain that it could not find the file(s).
To remove these changes from the list, you can open Source Control Explorer (View > Other Windows > Source Control Explorer) and either Delete the nonexistent files or right-click on the offending files and Undo Pending Changes.
You can also undo these specific changes from the Pending Changes panel in Team Explorer.
Create an empty file to replace the missing file and complete your check-in. After you have checked in the file correctly delete the file that is not needed.
Go to the project that has file 'blah blah blah', you should see the file has an error mark indicating it does not exist. Right click the file > Delete. That should take care of the problem.
I had a similar problem. I had forgotten I was tinkering with adding publish profiles for publish. TFS felt it needed to check that in, even though the output wasn't there. I simply right clicked on the App.Publish folder in Team Explorer inside of visual studio and chose to exclude. Checked everything back in with no problem.
I encountered the same error:
but my issue was a bit different. I was changing a couple of folder names and when committing I didn't add the new folders to the repo:
git add folderName
solved the issue for me.
I created a team project, say ProjectA
When I mapped it to my local folder, I found that the root server folder: ProjectA folder is not mapped. However the ProjectA folder within that IS mapped to the project. This is a problem as the BuildProcessTemplate is not included in source control and I cannot build my application.
How do I remove the mappings and start again?
On the source control explorer window in visual studio there is a drop down near the top for workspaces. When you originally mapped that folder, it created a workspace for you. If you want to change the mappings, it can be done by clicking the drop down and selecting the Workspaces... option. You can select your workspace and then click Edit.. to change mappings. You can also delete your current workspace and create a new one if you feel so inclined.
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.