Can't pull on Xcode Source Control (Repository is Locked) - xcode

Me and my teammates are having a hard time trying to fix an issue with source control and we don't know how to fix it.
What happened:
I had to change the bundle identifier to be able to build on a phone
I had to change the .plist file for google Firebase because of the bundle id change
I made a commit and pushed the project to our repository in Bitbucket and pushed it
Now when they try to pull the latest change they all get the files but with merge issues (That don't reflect on the source control screen) and when you check on the log it doesn't show that they were able to pull the commit (even though they got the files and all the files even have the head and MASTER text that shows up when you have merge issues). The error we keep getting is
"The repository is locked."
"Make sure any other operations on the repository are finished and try again. "
I tried checking the other questions but the same error only shows up for users that can't commit because the repository is locked. Not while pulling.

Related

Xcode stuck on wrong git branch

When trying to change branches I got an error saying my credentials were bad. Since then, Xcode shows the wrong branch. When I'm in command line it allows me to change branches, pull, commit etc...
When I try to change branches in Xcode, it says the repository is locked.
There's no lock file in .git and I can change from terminal (xcode doesn't change)
I've wiped derived data, restarted etc...
I completely deleted the project and recloned from GitHub Enterprise.
For a second it seemed to work...
but I tried to change branches and my old branches showed up and I got frozen again.
had to clone to the same directory however
Where is this state being cached so I can delete it and start fresh?
EDIT:
I've completely deleted Xcode, redownloaded the version I'm using (10.3), deleted these caches:
sudo rm -R ~/Library/Caches/com.apple.dt
sudo rm -R ~/Library/Preferences/com.apple.dt
as per this answer: https://stackoverflow.com/a/52541405/4522329
After I was setup, I reconfigured my Apple ID and GitHub Enterprise Account and recloned a second time.
Again things looked fine, until I tried to change branches...
Then my previous local branches popped up again showing me back on an entirely different branch and any attempt switch throws a repo locked error.
When I run 'git status' from command line, tons of duplicate files were pulled in from some cache and I'm shown on the branch I expect to be. I can do whatever I want from command line (still no lock file in .git), but it's not reflected in Xcode!!!
Also the launcher screen on Xcode is showing older, formerly deleted projects. There's some Xcode cache that's trying to recover from somewhere...
So this was weird. Still not sure the underlying reason.
I was able to resolve by wiping everything out again, cloning to a different location opening up in Xcode and cycling branches from within the IDE and then cycling through a few from command line and confirming the IDE was updating.
After that I moved the project to it's previous directory address. When I opened Xcode the recents list had two entries for the project in that location. I cleared both, then opened by directly clicking on my xcworkspace.
So far so good.

Xcode unable to load revisions when trying to commit and / or push

I am currently working on an Xcode project. Lately whenever I try to commit (directly from Xcode), I am not able to do so. 'Unable to load revisions' is displayed in the file list windows.
In addition, I am also not able to push online.
I tried committing and pushing using command line, but either I am not doing it well, or it is simply a band aid solution.
I also tried changing ownership of the xcowrkspace file ( I realm recently) and it does not do anything.

How to revert xcode pull request?

This is my problem and i tried to look solution, didn't find anything related to me.
created new project 1 —> and pushed to github.com (this project is dummy has no code)
created new project 2 —> wrote code and tried pushing to github.com with remote link to project 1 it gave me an error stating to 1st use pull the request. I did pull request.
now the project 2 became empty (which took 2 days to code) is there any option to get back my code?
That is a very strange situation. You shouldn't have been able to do what you describe.
Simulating what you describe in Xcode 8.0, I get a The remote repository could no be found - make sure a valid repository exists at the specified location and try again. message, because the projects are different.
Maybe something else happened.
Nevertheless, may this be a lesson to you. Commit locally first and then to the remote. You can do both, one after the other, with one operation in Xcode, by checking the Push to Remote box in the commit screen. That way you would still have your local code. ;-)

pulling an older version of a git repo to xcode

I am trying to get started editing an ios app that is stored on a bitbucket repo. The most recent version of the app crashes with a message:
[Crashlytics] Version 3.3.4 (82)
fatal error: unexpectedly found nil while unwrapping an Optional value
(lldb)
So, I am trying to pull an older version of the app.
I click "Check out an existing project" Then it prompts for me to enter the location of repository. I have no problem pulling and running the most recent version from the repo. Is there some way to specify that I do not want it to use the most recent version?
EDIT 1
The window I am working with looks almost exactly like this: http://www.techotopia.com/images/6/68/Xcode_6_add_git_repository_dialog.png
Do the Check Out first - just go ahead and check out the project repo. (You may already have done this.)
Now you have, on your computer, the whole repo, including earlier commits (versions) of the project. In other words, you didn't just check out; you cloned.
Now use Log View to find the commit you think will work.
Now check out that commit. You'll have to use the command line or Source Tree to do that; Xcode's weenie source control support won't help you with it.

Xcode Server won't build because source control information is in an invalid format

I have XCode Server set up with XCode 6.4 and OSX Server 4.1.5. I had integrations running fine until I transferred my git repository to another bitbucket account. No big deal right? Wrong for me :(. After I transferred my repository, I changed my git remote, I changed the repository location in Preferences in Xcode on my dev computer as well as on my server. Regular git functions are working fine from the command line and from within XCode. Nothing seems wrong until I try to run an integration and then it gives me the following build service error:
Could not check out sources because the source control information is in an invalid format.
I tried deleting my bot and creating another one. I tried cloning my project straight from the new location into another folder in case something had gotten out of sync. I git reset hard to the remote branch just in case even though there was nothing different. I tried cleaning and restarting everything multiple times. I reset XCode Server too (sudo xcrun xcscontrol --reset) and am still getting the error making me think I really did somehow mess up my git repository as far as XCode is concerned, but I have no ideas about what XCode doesn't like about my source control information. Does anyone have any ideas for what I can do or try? I've been tearing my hair out for hours.

Resources