Using TFS 2013 and VS 2012, I recently created a new "Main" folder under a project, then copied and pasted the Source folder from another project into that folder, then converted to branch.
After doing this the branch does not have the ability to drop down. If I select the local path, the folder shows up. But if I just select the Main branch from the Source Control Explorer it is empty within VS.
I have made sure that all my changes have been checked in and have no pending changes.
After copying and pasting into the Main folder, converting to branch, and checking in, I still had to right click on the Main branch and Add Items to Folder...
Once I did that, they showed up, I checked them in and am now good to go.
Related
So... how to recover a project? I recently changed the name all over the place and it was working properly. Today I stashed changes and committed, a popup appeared stating some file needed to be saved again and I did.
After this, the project doesn't open with this error:
Project /Users/{User}/Desktop/Proyectos/To Battle!/To Battle! BACKUP.xcodeproj cannot be opened because it is missing its project.pbxproj file.
What's worse is that the files I had open on Xcode and was editing, and compiled, and worked are nowhere to be found. Not on my comp, not on my iCloud Drive, nowhere. Ran a find / with some name of the files and there are results on /Users/{User}/Library/Developer/Xcode/DerivedData/Battle_Plan-fmoltogzcytatsanjtyvicdzzcjk/Index/DataStore which is the old name of the project
And here: /Users/{User}/Library/Developer/Xcode/DerivedData/To_Battle!-cgasouaduxuosbbpbnuqcrgkxump/Build/Intermediates.noindex/To Battle!.build/Debug-iphonesimulator/To Battle! (iOS).build/Objects-normal/arm64
which contains all my files in different formats: .d, .o, .dia, .swiftdepts and looks like the compiled code of my test runs on the simulator
So, any ideas on how to recover the project? I also had made a git stash and commit for the changes before everything broke...
Create a new git branch from the last commit you made before everything broke.
Press Cmd-2 in Xcode to open the source control navigator.
Select the current branch from the source control navigator to see all the commits you made on that branch.
Select the last commit you made before everything broke and right-click.
Choose New Branch from.
Name the new branch.
Select the branch you created from the source control navigator and right-click.
Choose Check Out.
Now your project is where it was before everything broke.
The source control navigator has a Stashed Changes folder. Your stashes should be in that folder.
Had to move my directories for the local workspaces for Visual Studio. I updated the directory locations in VS, but it acted as if they were completely out of sync, and asked to get latest.
I let it do so for one project - it (re)downloaded everything, came up with a list of files to which I had local changes, listing them as conflicts. I kept the local version of all the files, so no work was lost. But when I opened the project, those files came up as not being in source control, and it offered to let me add them. So again, I have all my work, but that's a tedious process to re-connect everything. Not to mention that I'm not sure I caught ALL the files that needed re-adding.
I've also considered copying everything to other directories, download a clean copy of the project(s), doing a compare and folding in my changes. Still messy, but possibly safer.
Is there a far better way to do this practice that I've missed? Perhaps as a side question, is there an easy way to list all the files in a project not in source control?
Guess you moved/changed local TFS workspace folders in file system directly. This caused some folders/sub-folders/files lost mapping.
In other words, all of these folders already out of source control. That's why you need to re-add or re-connect them to TFS source control.
A right way please refer how to move an item in TFVC:
You can use Source Control Explorer to move one file or folder at a
time. You should not use Source Control Explorer to move folders or
files that are referenced by a Visual Studio project or solution. Move
these files with Solution Explorer instead and check in the move in a
new changeset.
In Source Control Explorer, select the item that you want to move,
open its shortcut menu, and choose Move.
In the Move dialog box, either manually type the destination for the
item in the To box, or choose Browse to use the Browse for Folder
dialog box.
Choose OK.
Move is actually a delete and re-add process. You could also take a look at this similar question here: Moving project (under source control) to different folder
In your situation, a quick way to solve the conflicts should be: First back up your local files, delete your old workspace, create a totally new workspace. Get latest version from sever side to your new workspace.
Then copy your back-up files/folders which copied from old workspace folder to the new one. Windows system will judge to replace files and add new files.(It may take some time) After this, TFS system will auto detect the changes in local and will list them as new pending changes. Some new add files maybe stay in the Excluded list, manually promote them in Included list.
Finally check in all your pending changes, everything should get back on track.
Should I be worried that TFS is still telling me to ‘Add files to Source Control’ when they already are having moved files from one project to another in the same solution?
To provide some background, I got multiple projects in my solution. I needed to move a complete folder structure and the files from one project to another and sit them in a new directory.
So for example
Moving contents of ‘Website.Assets’ - $/Adam/Website/Website.Assets
To a new folder named ‘Assets’ in another project - $/Adam/Website/Website.App/Assets
I added the new folder ‘Assets’ via source control explorer and then added it into the project via solution explorer.
Having then moved the folders/files from the one project to the other via the move functionality in source control explore, then added to the project and checked in. The project now states there are still files to be added to source control, when there isn’t.
It's only when I right kick on the new parent folder 'Assets' that I see the message 'Add files to Source Control' non of the files that were moved from the other project to this project show this message.
Is this something to even worry about? If so any suggestions on fixing it?
I have just branched from Main to v5.0 but I realized that I want to move this branch inside the Release folder.
How should I proceed with TFS 2010?
Thanks.
Simply right-click on your branch in Source Control and select 'Move..'. Set your desired destination path, and commit this change. You should be OK.
I think I 've read somewhere that moving folders & renaming folders shouldn't be done in separate steps, so if you plan to also rename your branch, do this in a next step.Once you 're done, you should check that with right-clicking MAIN > "branching and merging" > "merge..." you have a target branch to your moved/renamed branch.
I created a folder in a TFS Project under workspace "CPortalWS". I deleted the workspace, but now I would like to delete the folder in the project and the delete option is not available.
I've tried to create a new workspace mapped to the project but I still don't get the option to delete.
Is this a bug in TFS? How can I delete the folder?
Any help would be appreciated.
Deleting a folder in TFS is a little strange.
You have to:
Create a Workspace
Get the latest source for the folder (to your local machine)
Inside Source Explorer, delete the folder
Check in your changes (this is the step that deletes the folder in Source Control)
only note that delete is not an actual delete.
the folders/files are still there and kept in Version Control, for example for Undelete scenarios.
You can see them and avail the undelete function if you go to "Tools > Options > Source Control > Visual Studio Team Foundation Server" and check "Show deleted items in the Source Control Explorer" and then right-click on one of the deleted folders.
so, if you want real delete, where the folder/files actually go away you need to use the Destroy Command which is only available from the command line, see link below
http://msdn.microsoft.com/en-us/library/bb386005.aspx
When you delete in TFS, it does not remove it from TFS. It maintains a copy of the deleted files, even when you check in the deletion. This can cause some issues.
To permanently delete from TFS, you need to issue a tfs destroy command.
To do this:
Open a Visual Studio Command Prompt.
Issue the following command: tf destroy $/SourceLocation/Folder. Where $/SourceLocation/Folder is the Source location of the deleted folder in TFS.
Please note: This command will also delete the file(s) from disk.
I had a similar issue, where I had 1 folder which despite being deleted from Hard drive, was still showing as in Source Control (with a green + by the folder). It also showed me the content but if I tried to open any, an error message informed me the file wasn't there.
Clicking on any folder didn't show the delete button. I then realised that selecting a file did! If you don't have a file, create a text file and add it to the folder you want to delete (via Source Control). Click this file, note the delete shows. Select a folder and note that the delete disappears but only after half a second. This small delay is actually usable.
I clicked the file, so the delete button is enabled and hovered the mouse above the delete button. Using the keyboard, I did a CTRL + A and as soon as all files and folders were selected I clicked left mouse button. And it worked! Everything was removed, including (and this is the odd thing) the parent folder.
Create a Workspace; and get latest on the base folder; Dont forget to cloak the relevant folders. If you are going to delete the subfolders then cloak all and get latest on the base folder. So you save a lot of time in pulling files.