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.
Related
Hey guys!
I am trying to upload my project to our TFS server and then my intention is of course to build it...
The thing is: When I go to Code->project_name and I click on "Upload files" it only adds the files in the current folder. I know it can't be the case that I have to create tens of folders and then add the relevant files to it as shown in the original folder.
How do I do that without uploading all of the files? the build fails if I only upload a .sln file.
I am totally new to is so I really don't know how to use it...
I tried to do it via the VS but It gives me some weird errors.
Any help would be appreciated.
*Using TFS 2018.
Thanks!
If you're using TFVC, map a workspace on your machine and add the code there, then check it in.
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 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
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.
Seems like this should be something very simple, but I can't find how to do this...
I made a changes to several files spread within a repo by using a script that I wrote. Problem is TFS in its infinite wisdom does not think the files have changed. Aside from manually finding each file and clicking "checkout for editing" is there any way to tell TFS to just rescan everything and detect changes?
A Folder Compare (File->Source Control->Compare...) should do the trick. Select the top folder from where to start comparison, and select to compare with Latest Version. The result hould show files that are changed, and whether they are checked out or not.
TFS has a "Reconcile" command for this. See https://stackoverflow.com/a/22860674/932282 for a complete answer.
Local Workspace
You need to work with a local Workspace. Here's how to manage workspaces:
visualstudio.com: "Create and work with workspaces".
When adding or editing the workspace you click Advanced >> . Then you set Location: to Local.
Now when your script or anything else changes files outside Visual Studio, your workspace detects the changes automatically.
It also detects adds or deletes but you have to include them to your Pending Changes manually with the link under Excluded Changes
BUT BE CAREFUL. When adds or deletes get detected and you add them to your Pending Changes, the files aren't automatically included to your project. So you maybe check them in to TFS, but they aren't listed under the Solution Explorer.
Matt Burke has a fix for that problem:
mattburkdev.com: "Automatically Include All Files in Folder in Visual Studio"
To edit the Project file you rightclick your project, chosse Unload Project, then rightclick on it again and choose Edit. After you edited the project files save and close it. Then rightclick and chose Load Project.
But with that you also need to be careful, because the Project only searches for new files in these folders to include, when you load the project and not while you have the project open. So when some files get added outside Visual Studio, you just reload the project.
Server Workspace
But if you have to stick to a Server Workspace for some reason i got another trick for you:
FIRST:
Check out all Files that maybe have pending changes (better check out many files). Then go to Team Explorer -> Pending Changes and choose all files you just checked out. Then choose "undo changes". After this you get a message "Confirm Undo Checkout". This message ONLY pops up for the files, which actually HAVE changed! Press "NO" for each files or "No to All".
FINALLY: Under pending changes all files get removed from the list except the ones which have pending changes.
I hope I could help someone and you didn't have to search for this solution as long as I had to ^^
If any of your changes occured when you were offline, you can go to File > Source Control > Go Online, and all files will be checked for modification.
If none of the above work, you can also try to rebind your projects by going to File -> Source Control -> Advanced -> Change Source Control.
In Visual Studio 2015:
Source Control -> Advances -> Refresh Status
I had this problem a while age when i moved project from one pc to another.
the solution was to remove temporary files that TFS had created in solution folder.
Delete .vs and hidden $tf folder.
If no luck,on your local PC copy your solution folder to another, remove all files inside solution, get latest version from TFS server ,then from the copied folder just grab neccessary and edited files and put them back to solution folder (this will overwrite some files).
After all don't forget to check project mappings and if everything seems correct try right clicking on solution and 'Add to source control' option.
Dtsx file dropped in TFS folder was not being recognized.
On your Visual Studio (2015) home screen, click on the Team Foundation Server link. Make navigate to the correct branch.
On the window on the left side of the screen, navigate to the folder that contains your file. Expand the folder.
To the right of the folder you will see three dots. Click on those and then click on “ + Add File(s)”.
Choose “Upload Existing Files”. Then you can drag and drop your .dtsx files into the window and then click Okay.
Finally, you’ll have to do a ‘Fetch’ to add the files there. Then you need to do a ‘Pull’. Lastly, you can commit the change to remote branch.