Xcode error "local repository is in an unsupported state" - xcode

I switched branches in Xcode 14.2 using the "keep changes" option ("apply stash"). Now Xcode behaves as if there was a unresolved merge conflict, even after I discarded all changes and did a hard git reset on the command line.
I see a yellow exclamation mark next to the branch name. When I click it I get a dialog saying "repository is in conflict" with the only option "abort the current operation". But when I click that I get a message "repository is in an unsupported state".
Does anybody know how to get out of this state?

I figured it out: I had an unfinished git bisect running in that repo :| git status is your friend here

Related

What should I do when Xcode says a previously commited file is unversioned?

Occasionally, Xcode shows "File is Unversioned" in the Version Editor (and shows a question mark by its name) for a file that has already been updated and committed several times in the past. If I go ahead and commit the file again, Xcode then shows the complete history in the Version Editor. I did not rename or move the file when this happens.
Is there a way I can force Xcode/git to recognize the file without re-committing it?
I'm currently using Xcode 10.2.1.
I used the command line once
git add .
git commit -m "your commit message"
git push origin main
After that, everything on XCode Source Control worked as per usual.

Xcode source control not showing current branch changes

I am running Xcode 8.2.1, and am using github version control. Normally, I am able to press Source Control in the top bar, and then Commit. This menu usually shows all of the files I have changed on the local branch, and I can click through the files and see the local diff. When I run "git status" in the terminal, the modified files show up. Are there any ways that this could be unlinked from my source control? I have set my Source Control preferences to Enabled, and have all of the options selected except "Show Git merge commits in history"
No, you can’t unlink terminal from xcode.
In xcode, what you did is based on local working copies. And the git commands you used in terminal is also based on local git repo. So git status from xcode and terminal should always be synchronized.
If you want xcode to show which files are changed before you use source control -> commit to find the changed files, there is no good ways on xcode. You can use the command git status you find these files.
Or you can feedback this request here, such as change the icon to red check mark if the file is changed (no changed files with blue lock icon).

Git version control history "modifed files" are empty in Xcode 8.1

When I click "show modified files" in my Git History
I see empty window with message "No version Editor"
I noticed, that If I commit some files and doesn't restart XCode, history of that commit will show modified files well. But after Xcode restart it becomes empty too.
My settings:
XCode 8.1
Console git commangs like git log -p, work fine.
How can I reattach repository to my project to reset it?
I have no repositories in my accounts settings:
Yes, it’s the bug for xcode to show modified files in version control history. You can vote your voice in Apple bug reporting

How to resych xcode and Git

I had a power failure while using xcode. I use Git and Time Machine. When my machine came back up, and I restarted xcode, most of my project files are marked with a status of '?'. There are some that are incorrectly marked as 'M'. I tried doing a commit but got an error consisting of a list of my project files that were supposedly not being tracked by Git (the list was not correct) and the commit failed.
After reading some entries on SO I exited xcode and tried
git stash
git reset --hard cf530af
git stash pop
This left me with short list of modified and deleted files which was correct. But when I restarted xcode the file stats icons were unchanged.
Next I exited xcode and restored last night's Time Machine backup. That went smoothly, but when I restarted xcode, the file status icons were still incorrect.
At the moment, git status shows results I believe to be correct. git fsck shows a number of dangling blobs and 1 dangling commit.
What do I need to do to resynch xcode and Git so I can git back to work?

"Git Bash Here" creates a bash terminal with a nonfunctional version of git

I've suddenly started experiencing an issue on Windows 10 where right clicking in a git repo folder and selecting "Git Bash Here" returns a bash terminal that has a useless version of git in it.
I say that this version of git is useless because you can enter git commands, but nothing seems to happen. (git log is the only exception to this, as it works fine, showing the history of commits.) All of the other git <commands> return absolutely nothing. Not even an error is returned.
Things worth noting:
Sometimes (maybe every time?), before an unsuccessful git command is 'finished running,' a quick black prompt is seen flashing on the screen for a fraction of a second.
Right clicking and selecting Git GUI Here prompts me with an error window
Window title: "git-gui: fatal error"
Window content: "Cannot parse Git version string:"
Reinstalling does NOT solve the issue
Another coworker started experiencing this same issue a week before I did, so now I'm left wondering if a slow roll out of a Windows update was to blame, as we have the same desktop environment and IT department supporting it.
Question:
How can I restore the functionality of "right click Git Bash Here" in Windows 10?
This error is resolved by altering compatibility mode on git-bash.exe (located in C:\Program Files\Git by default), specifically setting it to always run as administrator.
This can be done by right clicking the executable (again, git-bash.exe), clicking Properties, the Compatibility tab, and then checking "Run this program as an administrator". Click Apply, then OK, and you should be all set.
NOTE: Apply these same steps to git-gui.exe, located by default in C:\Program Files\Git\cmd, to fix the issue stated with the Git GUI Here selection in explorer's right click window.

Resources