I'm pretty new to Git and Bitbucket etc so am hoping this is something easily fixed although after Googling around I can't find anything similar.
I have an XCode Workspace (project and pod stuff) which I have made a git repository for. I've then created a new remote repository on Bitbucket and pushed the local repository there. So far pretty simple.
I have then gone on to another machine and pulled the repository and here is where I get a problem. In the workspace I can see / expand the Pods but the project is showing with red text and is not expandable.
I had no idea at first why this was but I then noticed that if I left click on the project and look at the identity and type on the right hand side the location is wrong. The path in th epic below is not the path to the project file on the new computer. Instead it is the path to the file on the original computer which was used to push the repo up to Bitbucket.
I've tried changing the location but the best I can do is open the project rather than the Workspace. Ideally I'd be able to change the way it in the original so that the it doesn't need changing in clones but I can't seem to do this in a satisfactory way either.
Any help would be much appreciated.
This is a pretty common problem, usually met when passing projects around
Solution
Press the folder icon under 'Location' and choose the folder the contains your .xcodeproj
Related
I have created a repo. on bitbucket. Now I want to connect that repo to the Xcode 9.So I can directly push, pull and do all the git stuff from Xcode.
is there any way to do that?
thanks!!!
If the project folder is already on your computer, and is already under git control, skip this first step. Otherwise, use the command line, or Xcode's Source Control > Clone dialog, to clone your bitbucket repo onto your computer.
Open the project in Xcode and work with it.
There is no step 3! Xcode will see that this repo is under git control and you'll be able to use Xcode's built-in source control features as usual.
I just spent an hour cajoling Xcode 9.2 into using a new Bitbucket git repo as a new remote. I had trouble adding a new remote using the Bitbucket SSH URL since Xcode assumed my user name is "git" and did not allow me to edit it. Here are some tips in hopes it saves you some time and aggravation. This assumes you are already using Xcode's source control and have made commits locally on your Mac. Make sure your commits are up to date before going through this procedure.
Create a new empty git repo on Bitbucket. Do not create a readme at this point, as this would make your new repo not... empty.
Use the HTTPS address to access your Bitbucket repo from Xcode. Problem is, for an empty repo, Bitbucket does not make it easy to figure out what this address is. For me, it was the same URL Bitbucket shows for SSH access but replacing "git#bitbucket.org:" with "https://user#bitbucket.org/", with user#bitbucket.org (hopefully obviously) YOUR username.
In Xcode, open the Source Control Navigator. This is the second icon from the left in Xcode's left panel next to the folder icon, it looks like a square with an x and a circle in the middle. Right click "Remotes" and select "Add Existing Remote...". Under "Remote Name" enter "origin" or "Bitbucket" or whatever floats your boat and under location enter the https:// URL from step 2.
Now, hooray, in Xcode you can do Source Control->Push successfully.
Thank goodness Apple does all my thinking for me, it saves me from hurting my little brain. Now my only brain trauma is from banging my head against the wall dealing with this kind of nonsense.
You can actually add real Github* account to your Xcode under Xcode/Preferences/Accounts.
This will actually do authentication when you checkout Bitbucket project after that. I guess that they joined user databases.
I had exactly the same problem as You had. To solve it I created a project with a git version control within Xcode 9 and then someone asked me to share it. To do it I created an empty repo on bitbucket, copied its address and then went in terminal to my project's directory.
cd ~/repos/<repo_name>
Once there you just have to write
git push --mirror *copiedRepoAddress
Make sure that the repository you created at bitbucket is EMPTY and that you have commited all changes on your local repo.
Just follow below steps your project will be added automatically to bitbucket.
1.Go to Source Controller ---> create git repository
once click on create option.
2.Open your Bitbucket account and create new repository.And choose i have an existing project.
3.Select your repository address.
I'm having a problem with my Xcode
I set my svn settings in the account settings seems to connect just fine
then I want go to the project I want to commit to the server when I click on source control the only clickable thing is checkout. I tried this like 20 times. It just creates a map with the name of the SVN server that's it.
Does anyone have an idea what I'm doing wrong here?
It seems like you are just creating the appropriate folder for it but not putting your project in it.
Try this. do the checkout again like you already did before, then locate the project you want to sync with your SVN, place it into the folder that was created when you used the "Checkout" function. Now open your project again from within this folder. You should be able to commit/push/pull etc. your project now.
Hope this helps.
I have referred to a lot of forums and also this so question but my problem is that I have formatted my machine. So I'm not able to overcome this issue. I have tried deleting workspaces from visual studio command prompt and also clearing cache, but I feel this mapping is more on the server-side than local cache, because my machine was formatted. I don't know which file has this old working path saved.
Also I have tried downloading the project into a new working path. I was able to download, but then I don't get the TFS icon against each file. i.e.it's like working offline (disjoint from TFS database). On right click we generally have an option to return online or go online. In this case on right click I get TEAM -> Apply Patch & TEAM -> Share Project
Please help me with this.I had the same problem in my asp.net projects, when I simply downloaded them onto a new working path it worked fine. But this java project in eclipse just doesn't seem to connect to tfs when downloaded into a new path nor does it allow to download in the old path.
Please not I have formatted the machine.So my case is different, so this may not be a possible duplicate of other SO questions.
I did not disconnect or delete workspace before a format(due to lack of knowledge) at that point. May be doing that would never cause this.
All I did is check in all files and re-formatted my windows.
I'd suggest using the (free) tool TFS Sidekicks: http://www.attrice.info/cm/tfs/
This will give you a GUI to view all workspaces (across all users and machines), and delete the obsolete ones.
This is stored on the server, but the tf workspace command should be able to remove it for you. You will probably need to supply it with the correct machine name to find it:
tf workspaces /computer:* /owner:domain\jesse.houwing /collection:http://yourserver:8080/tfs/DefaultCollection
Find the missing workspace (the one that was formatted) and remove it from the server:
tf workspace /delete /collection:http://yourserver:8080/tfs/DefaultCollection workspaceName;domain\jesse.houwing
Do not confuse tf workspaces /remove and tf workspace /delete, the former only removes the registration from your machine, the second removes it from the server.
Or, if the computer name and the username have stayed the same, edit the workspace and delete the paths no longer valid (or update them to their new location) by changing the workspace configuration. Use
tf workspace workspaceName;Owner
to open the dialog to edit your current workspace.
Or use
tf workspaces /updateComputerName /updateUserName
To reassign the workspace from the old computer (iinstallation) or user to the new one.
I tried using the TFS sidekick tool, but even then, ran into access denied error. Then I had to manually clear off the files from this path:
C:\ProgramData\Microsoft Team Foundation Local Workspaces
So this can be alternative, if you do not want to install a tool or your company does not allow you to install software from unknown sources on your laptops due to policies.
This already has a marked answer but my problem was solved without command line or additional software.
I had just recently updated to '15 and I was migrating my workspace folder to another drive as it was getting too big. The error being uninformative as it was, still appeared even after I deleted the workspace it cited...or so i thought. Both VS'13 and '15 by default made the same named workspace but one for each version. I had to reopen '13, and delete that workspace then move back to '15 where it would now let me remap my folder.
Hope this helps someone.
logout from previous user and login by new user.
Copy Project Folder to Another path.
In team Explorer Right click on project and Remove mapping.
Remap Project
go to Control Panel --> User Accounts --> Manage your credentials --> Edit tfs User Name
user name : your TFS user.
I solved it like this.
I had the same problem.
TFS workspace manager throw me this error:
"The working folder \PATH\ is already in use by the workspace my_computer_name name_of_previous_user on computer my_computer_name"
I solved this problem by creating user in TFS server and deleting the previous one.
U can go to TEAM> TEAM PROJECT SETTINGS > SECURITY.
& if u have permission- create your own user.
This is what I did to get it to work using Manage Workspaces in VS:
Click on Show remote workspaces, delete remote workspaces as I was not using them anyway, not sure if this was needed.
Created a new Workspace B and mapped to another folder Y and choose yes to download all files now.
Deleted original workspace A, mapped to Folder X.
Recreate original workspace A and remap to folder Y (wrong folder) and choose Yes to download all files now.
Delete Workspace B
Edit Workspace A, go to Advanced. At the bottom where it says Wroking Folders, change the Local Folder path back to folder X and choose yes to download all files now.
Not sure if you have to do all those steps but that is what I did to finally get this remapped, only took all day.
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.
I've added an svn:externals to my project, and it works great locally via TortoiseSVN. When I use Jenkins to pull from the same repository, it's not showing anything about the externals in the console output.
I read some other questions on here and I made sure my SVN version number in Jenkins was set to (1.6 externals to file) and restarted Jenkins. The problem is still occurring. Any ideas of something else I could set, or something I could use for troubleshooting? Thanks.
Oh, and the external directory is in the same repository, so I don't think it's an authentication issue as it builds fine without a reference to the external files.
I fixed this issue by selecting higher SVN Version Number on Jenkins 2.222.1.
Here is the procedure:
Manage Jenkins -> Configure System -> Subversion Workspace Version
Select at least v1.6. (The default one was 1.4 for me)
I may have had a very uncommon structure, but here's what worked for me...
First of all, here's the directory structure:
--Parent
----folder1
------subfolder1
------svnexternalfolder
----svnexternalfolder
As you can see, I had my svn external folder in two different levels of the project structure, but the Jenkins project was pointing directly at "folder1".
When first configured, it would never pull the files for my svn external folder (whether it was a full checkout, or svn update). This was configured with the svnexternals at the parent level.
My next try was to remove the svn externals at the parent, then specify just the higher location on the parent, then the lower location on folder1. This gave an error since the child svn directory had the same name as the other one.
So I flip-flopped the order of creating the svn external locations and did the child first (on "folder1"), then did the higher one on parent. Once I did that, everything started working.
Hope this helps someone else.
If you're curious about why I configured the directory structure this way, this was a PhoneGap project. apparently cordova/phonegap projects create their directory structures like this, the common folder beneath the parent is the "www" which houses all html, javascript, etc files, then those are also used under the platforms/ios, or platforms/android folders (in my example, I just called it folder1).