XCode Source Control status constantly refreshing - xcode

I'm running XCode 6.1 and working with a git repo. XCode's source control is turned on, as well as the options Refresh local status automatically and Refresh server status automatically and Add or remove files automatically.
Every 10 seconds or so, xcode shows every file's status as changing to unknown (a question mark). After a bit, they mostly all refresh and show the correct status. This keeps happening over and over.
Why is this happening and how can I stop it?
They look like so:
Question Marks
Normal

Finally I have found the cause of this problem, and thus the solution.
My git repo was checked out on my local machine inside of another git repo by accident. Doing this cause massive confusion to XCode, apparently. Doing a fresh checkout in a different folder fixed the problem.

To resolve this you need to do the following:
Go to Source Control -> Refresh Status.
It should solve your problem.

Related

Can`t see the file history in Gitlens (on a specific project)

I have a problem with Gitlens extension. Firstly, Gitlens or Git History extension is working fine on any other project except the this Laravel project. My problem is, can`t see the file history or line history in this project.
On the other hand, there is no problem in the git log (Git History Extension) as seen in screenshot;
But I can't compare any files with their any version (every commit seems like in the ss). I have no idea what the problem is about.
Lastly, I don't think the problem is about extension settings because other projects do not have this problem. Is there a any chance to fix this issue without resetting git history?
I am answering after 3 months, maybe it works for someone. As I mentioned in the title, surely there is no problem about extension settings for this specific project. The problem is just about git files. Maybe, I damaged some git files while moving the project on my desktop :)
So, there is no chance to fix this issue without resetting git history or starting fresh with git, if you`re having the same problem.
Do not play with git files, it`s no joke!
I've got a similar issue. My problem is in using symbolic links for folders.
I have this folder symlink for my repos.
C:\>dir
Directory of C:\
27.09.2018 21:07 <JUNCTION> repos [C:\Users\Qwerty\repos]
(GitLens v11)
The top editor is opened via C:\repos
The bottom editor via C:\Users\Qwerty\repos
You can see that some git features still work (yellow), but others don't.
However, this is very strange, because in my other repos, I have never observed such issues.
Also notice below that it is still possible to invoke the same action via a git lens popup and then it is possible to use the Prev Next Revision buttons.
Anyway, after more testing, I actually observe the same thing in my other repos. I assume that something must have changed between versions as I only observe these issues for last maybe 2-3 months. I even submitted a ticket that GitLens stopped working in v12.0.0 and later versions https://github.com/gitkraken/vscode-gitlens/issues/1979
The buttons completely disappeared and even the commit information
v11
v12
And Now actually, after having reopened my repo via original path and after updating GitLens back to v12.0.6 I see that it is working properly!
Bottom editor is opened via C:\repos symlink.

git (windows) - find file that was saved locally but not committed/staged

I normally create new branches from master for different JIRA tasks and them merge them back into master with pull requests when the task is completed.
However, I'm using Rstudio and always have a local script open which acts a a rolling cookbook of tricks and tips to look back on. Basically its a library of my R knowledge.
Unfortunately I believe I've lost a couple of weeks work on this file as I think dropped any changes from the master branch, then created a new branch, created/edited a different file and merged back into master for a separate task.
I'm on Windows 10 and restore previous version doesn't seem to be available. The last restore point is a day after the last pull request I had merged. Im trying to find a way to find any other version of this file either in Git or older versions on my machine.
Whats the best way or tools to do this. I've lost some changes to an algorithm I'd been working on which successfully turned a 6 hour job into a 10 min job and I don't want to try and remember how I did it. I'm using visual studio for Git and I've got Git tortoise. According to tortoise There was a merge on 19/04 and nothing before 09/02 so I don't think Git ever staged or committed the changes I've lost that were all written between the 16/04 and 20/04.
EDIT
I think I've found it. Although its not in my Rstudio history in the UI (or the history file opened in notepad), when I use the search function in Rstudio's history it finds it?! Rstudio apparently has everything I've ever written and its timestamped too.
Still keeping this question open for future issues (although I've made this file local now to avoid this in the future). If anyone knows where the 'master' history file for Rstudio too thats of interest.
As mentioned in How to access the script/source history in RStudio?
RStudio's source panel is essentially a view to an Ace Editor
You have found the "searching history" which allows you to find back all past files/commands.

XCode 5 - the local git repository could not be reached

I created a project with local git repository using XCode 5 (preview 6), made some changes and tried to commit, and finally got the message "The repository 'HelloWorld2' could not be reached, please verify that the repository is online and reachable and try again".
The same message is also shown when the Refresh Status menu item under Source Control menu is clicked.
Actually, I have XCode 4.5 installed and run side by side with 5.0, but the issue does not exist when the project is opened using Xcode 4.5. Also, the commit action works fine as well via command line.
Not sure if this helps in the tracking down of this problem, but here goes anyway:
I have been connecting to a local network git repository perfectly well for a number of months, but I encountered this problem later yesterday and nothing I did seemed to improve the situation. That included:
Rebooting both the development machine and the server;
Reinstalling Xcode from the App Store;
Re-cloning the project from the git command line (which could see the repository perfectly well);
Checking out the repository from Xcode (I was able to check out but every other operation, such as , Commit, Refresh Status etc. seemed to cause the problem...)
Manipulation the repository with SourceTree (which could also see it fine).
Eventually I stumbled across a solution to my local issue. If I launch Xcode with a wired and wireless network enabled then I can't see the repository. If I close it, disable wifi and relaunch it then I can.
I've not had much opportunity to work out what the difference is (especially as the wifi connects to the same network and is the secondary choice for networking) but it does seem to fix it.
Hope that might help others and hopefully I can find a real explanation soon!
Dave,

github for windows crashing several times a day

I newly started working on Github via their native Windows Application, it's quite good however it's crashing so often and the horrible thing is that I lose all the recent changes after it's crashing. All the local files will rollback to the last version of the successful commit or sync.
I'm on a 64bit windows 8 machine. Any ideas?
The exact error after crash is Couldn't find a HEAD in this repository
I sent an email to GitHub For Windows support. Their answer was this:
Hi David,
I am sorry for the trouble.
I have been able to reproduce this problem, and have filed a report for our developers to look at. The reason the application is crashing is likely due to merge conflicts between the local and remote repositories.
The easiest way to resolve this would be to go into the repository that is saying 'failed looking for HEAD', closing that pop-up, and clicking Tools -> Open a Shell Here.
From the shell, you can run 'git reset --merge' to undo the merge that caused GitHub for Windows to crash.
From there, run 'git checkout master' to switch from the detached HEAD.
After that, run 'git pull' in the shell to pull down any new changes. It will prompt you to fix any merge conflicts (which is what caused the app to crash).
Once you fix the merge conflicts in the files, you should then be able to sync correctly in GitHub for WIndows.
I have been testing this issue, and after I resolved the conflicts with the initial crash, I no longer had any further trouble with GitHub for Windows. It correctly prompted me to open the shell and resolve merge conflicts rather than crashing.
Let me know if you have any further questions, and hopefully we will have a fix out for this soon.
Best,
Steve
This is the solution I received from Github support. I'll copy & paste the exact text here:
The easiest way to resolve this would be to go into the repository that is saying 'failed looking for HEAD', closing that pop-up, and clicking Tools -> Open a Shell Here. From the shell, you can run 'git reset --merge' to undo the merge that caused GitHub for Windows to crash. After that, run 'git pull' in the shell to pull down any changes. It will prompt you to fix any merge conflicts. Once you fix the merge conflicts in the files, you should then be able to sync correctly in GitHub for WIndows.
I have been testing this issue, and after I resolved the conflicts with the initial crash, I no longer had any further trouble with GitHub for Windows. It correctly prompted me to open the shell and resolve merge conflicts rather than crashing.
I had this problem after I made an unstable change to my .gitconfig user file.
I only detected the issue after I tried using TortoiseGIT and it outlined the error parsting the config file with an unexpected token.
So the fix was to correct the bad .gitconfig file.

Getting a "Commit from Multiple Working Copies" message.. not sure what to do?

I opened a project yesterday via Open From Subversion
I accidentally saved the project to C:\Users\blahblah....
I then immediately closed the project, and Opened From Subversion again, saving it to the correct directory.
Now I'm trying to commit the changes I made since opening the correct project and I'm getting this message:
Is there a risk that I can screw things up if I deselect C:\etc and instead select D:\etc and commit that?
There are no changes to the C:\ project. Also, I now have to merge the changes from yesterday into another branch.
This dialog appears whenever more than one working copy is involved and is mostly seen when changing your code and an external. It means it will commit your code and the external separate because this is dealt like different working copies and so this must be done.
In your case your solution was partly saved somewhere else making a second working copy (from the same repository). Guess you did the right think when deleting the mistakenly created files.
I deleted the C:... solution. It seems to have done the trick because the D:.. solution committed ok after that.

Resources