I installed git-lfs using homebrew, and it works fine from the command line. I can still add text files in Xcode as well, but whenever I try in Xcode to add a file which should be tracked by git-lfs, there is no effect (the file stays "?" in Xcode's file list, and the command line confirms that the file was not, in fact, added). After some research, I tried adding ~/Library/LaunchAgents/my.startup.plist to setenv PATH /usr/local/bin but it had no effect.
How can I get Xcode to play nice with git-lfs?
There seem to be a problem with using git-lfs with Xcode. See this article:
http://gopalkri.com/2016/05/17/git-lfs-xcode-asset-catalogs/
Might be better off to stick with Git to commit your changes instead of doing it via Xcode.
We have a similar issue, our CI uses Xcode's git and not the homebrew one. So we needed to get git-lfs working in Xcode. This proved pretty simple: copying the git-lfs core file from the homebrew version into Xcode (you need to do this again every time you upgrade Xcode):
sudo ln -s `which git-lfs` /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-lfs
Edited to highlight great improvement by #blackjack75.
Related
Installed MacVim on my Yosemite 10.10.2 Macbook Pro today from http://www.macupdate.com/app/mac/25988/macvim
The problem is that no editor window(s) are visible. If I open a file using the menu, there's simply no effect: no editor window appears. It's not hidden behind other windows, it's not listed in the Windows menu, it's just entirely undisplayed.
Strangely, the file will appear in the MRU list, though. So this renders the entire editor completely useless. Should I just build gvim myself? Is this app actually being maintained by anyone?
I'd read some answers which suggest running:
brew install macvim
... does the trick.
You might want to try that first.
What worked for me...
However, this didn't work for me because although it updated my macvim, the one being linked to in the /Applications folder was not the version being updated by brew.
So, here are the steps I had to take.
Quit MacVim if open.
Delete the MacVim file in /Applications.
In the terminal, run:
brew install macvim --override-system-vim
Run (this will add the link to your Applications file):
brew linkapps macvim
I can't be sure every step above is required, or that the --override-system-vim flag is required, but I can tell you that doing the above steps worked for me.
Hope this helps.
It looks like MacVim development has been moved to a new repository (and maybe a different group of developers?):
https://github.com/macvim-dev/macvim
This repo has had changes applied to fix MacVim's graphical problems under Yosemite. (This is the same location that brew's macvim formula currently pulls its source from, which is why MacVim works on Yosemite when installed via brew.)
They also have a set of precompiled binary releases:
https://github.com/macvim-dev/macvim/releases
The latest ("snapshot 76") has worked fine for me in Yosemite so far. You just need to download the .tbz archive, double-click it to unpack to a folder, then drag the MacVim.app icon to Applications -- much easier and less invasive than installing a whole package management system and build environment! :)
Note: I had to execute a command given in another StackOverflow answer to correct a rendering glitch seen in full screen mode for snapshot 76:
$ defaults write org.vim.MacVim MMNativeFullScreen 0
I got the same problem today.
The solution:
mv ~/.vimrc ~/.vimrc_bak
It looks like there is something wrong with my .vimrc file.
I was having the same issue, and one of the answers in here helped me, but not for the reason explained so I thought this might be useful for others.
Some plugins might depend on the version of vim, and may work in version 7 but not in version 8, when you install MacVim this could be version 8, and the terminal vim version might be 7, both will use the same .vim folder and .vimrc to load the plugins and configuration, when you open the vim from terminal it might still work because the plugins were depending on vim version 7, but when you try to execute MacVim it will try to load the plugins using version 8 and then it will crash, the reason some of the answers worked it's because they are replacing the system vim, therefore MacVim and vim will be in the same major version, if you have upgraded from the previous version the best you can do it's to clear up the plugins folder and then load MacVim or vim and check that everything is working, then start applying the plugins one by one checking that they are not breaking vim. At least with this method I found that one of the plugins was not working as expected and removing it solved the "MacVim" issue.
In summary:
- move your .vim as .vim_bak
- move your .vimrc as .vimrc_bak (suggested by #hai feng kao)
And test if this solves the issue, if that's the case then a plugin is breaking your installation and you will need to activate some and figure out which is the one that causes the issue.
Hope this helps to others, I've followed a lot of these recommendations without success until I decided to upgrade vim (terminal) and this started to break as well, that pointed me in the right direction.
Again hope this saves some hours for some.
I had the same symptom with MacVim launching with no window and command-N doesn't start any a new one. brew re-install didn't help.
It turned out there was another instance of macvim installed on my system somehow, in the Downloads folder. I found out by clicking "MacVim" --> "About MacVim" and it was a version from 2014. I found the instance and deleted it.
I created an alias for the newly installed version and copied that into Applications folder so spotlight search can find the new one. That solved my problem.
I had this problem upon updating from MacOS 10.12.5 to 10.12.6.
I uninstalled MacVim by moving it to the trashcan and downloading it again.
I would guess that the new version fixed whatever issue it had with the new operating system.
I was trying to build GMP on OS X, and it fails with the following error:
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup: No such file or directory
The problem is due to this command:
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/SMSandboxTools-tmp/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Someone isn't parsing the directory name properly. Does anyone know how to prevent Xcode from generating folders with spaces in the names?
You can't prevent Clean at Startup from being generated.
Your build script could either escape the spaces, or simply put the whole path in quotes. For example, this doesn't work:
$ cd /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup
But this does:
$ cd "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup"
If you don't want to fix the script yourself, I would just open an issue with the GMP developers.
My installation was botched. (Cleanup at Startup sounds an awful lot like something the OS leaves around for dealing with after an update... and I did have an update with issues.) I'm guessing Apple's developers have encountered this before, as the Xcode manual for the command line tools has the following:
The Command Line Developer tools package has been updated to include xcrun. xcrun adds support for the following:
1. The --show-sdk-path option queries SDK paths
Invoking xcrun --show-sdk-path gave the nasty, ugly path with Cleanup at Startup. On the same help page is this:
On OS X Mavericks, xcode-select provides the --reset flag to revert to using the default search paths.
I invoked xcode-select --reset, and that fixed my problem! GMP built smoothly, and xcrun --show-sdk-path now displays nothing... which seems weird, except that, as I say, gmp ran, tested 100% correct, and installed.
When I attempt to run FileMerge as a GUI for Opendiff, I receive an error:
$ git mergetool -t opendiff
Merging:
Gemfile
Gemfile.lock
...
Normal merge conflict for 'Gemfile':
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (opendiff):
2013-12-26 20:00:20.248 opendiff[22367:e07] Couldn't find FileMerge
Gemfile seems unchanged.
Was the merge successful? [y/n] ^C
$
I have installed XCode 4.6.3 and Command Line Tools for Xcode April 2013. I am running OSX 10.7.5
I have tried solutions from the following two links with no success:
git diff with opendiff gives "Couldn't launch FileMerge" error
Is filemerge still available after Xcode 4.3 installation?
When I go to Xcode -> Open Developer Tool I do not see FileMerge in the list of options. There is a More Developer Tools link that takes me here: https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-
How do I get FileMerge working?
FileMerge is located at within Xcode.
From the command-line:
cd /Applications/Xcode.app/Contents/Applications/
open .
Go into that directory once it opens:
Right-click on the app
Choose "Make alias"
Move that alias to your Applications directory
You're all set.
Strange. "XCode 4.5, where is FileMerge ?" suggests:
The FileMerge that is bundled with Xcode 4.5 doesn't work as a standalone application. I tried compressing it from the application bundle. I was able to expand it to show the FileMerge app on the desktop. But when I tried to run it I got an error saying it couldn't be opened.
Apple's developer downloads site has every version of Xcode. You could try trashing your current version of Xcode 4.5, downloading Xcode 4.5 from the developer downloads site, and see if FileMerge is there. If not, you can download Xcode 4.4 and see if that has FileMerge.
Indeed, I downloaded a fresh new install of XCode 4.5 and put my updated 4.4 to 4.5 upgraded version into the trash and I have now all the developer tools again, including FileMerge. Weird...
The other option, from that same thread:
Why not just install the Command Line Tools? That will give you the "opendiff" tool. Then, you create a little script like this one to make it useful and actually do a merge.
#!/bin/sh
# Get a hold of the last parameter.
eval LAST=\${$#}
# Now run opendiff with the previous version and the current version.
opendiff ${*} -merge "$LAST"
if you have xcode installed, then you can probably run the following from the command line to open FileMerge directly
open /Applications/Xcode.app/Contents/Applications/FileMerge.app/
Try reinstalling Xcode. I had the same issue and it fixed it for me! It appears the Merge utility got corrupt somehow.
I'm having problems with Xcode's built in SVN manager.
I checked out a remote SVN repository and I want to commit the changes while I'm working in Xcode's editor. As seen on the screenshot, it shows the correct SVN flag in the Organiser window and also in the editor sidebar (M for modified etc.), but when I try to commit from within the editor, I get the error:
The operation could not be performed because no valid working copies were found.
Although commiting/updating etc. works fine in the Organiser window…
Any ideas why?
I had this exact same issue recently.
The solution for me was a simple restart of Xcode, and after that all the files were noted as being updatable via the right click "Source Control >" menu.
I encountered this myself today when trying out Git with Xcode for the first time. I created two demo projects with the "create a local git repository" option and they had the same problem. I was able to commit from the organizer window, but the main Xcode file view didn't seem to recognize git at all.
After quitting and restarting, I created a third demo with the git option, and the main window recognized the changes right off the bat - i.e showed the "M" beside a modified file.
I think Xcode subversion version is different from repositary version.
if you use other svn management tools like "cornerstone", you have to check versions.
Check subversion's version on Terminal
1.xcode subversion
/Applications/Xcode.app/Contents/Developer/usr/bin/svn --version
2.installed subversion
/usr/bin/svn --version
3.port installed version
/opt/local/bin/svn --version
check these versions and upgrade Xcode's svn binary.
This is what i did.
$ cd /Applications/Xcode.app/Contents/Developer/usr/bin
$ mkdir svn_backup
$ mv svn* svn_backup/.
$ ln -s /opt/local/bin/svn* .
and restart Xcode.
For what I've read I need Python-Dev, how do I install it on OSX?
I think the problem I have, is, my Xcode was not properly installed, and I don't have the paths where I should.
This previous question:
Where is gcc on OSX? I have installed Xcode already
Was about I couldn't find gcc, now I can't find Python.h
Should I just link my /Developer directory to somewhere else in /usr/ ???
This is my output:
$ sudo easy_install mercurial
Password:
Searching for mercurial
Reading http://pypi.python.org/simple/mercurial/
Reading http://www.selenic.com/mercurial
Best match: mercurial 1.5.1
Downloading http://mercurial.selenic.com/release/mercurial-1.5.1.tar.gz
Processing mercurial-1.5.1.tar.gz
Running mercurial-1.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_7RaTq/mercurial-1.5.1/egg-dist-tmp-l7JP3u
mercurial/base85.c:12:20: error: Python.h: No such file or directory
...
Thanks in advance.
I was struggling with this problem all day today.
I eventually discovered a site that claimed that all one needed to do was to reinstall Xcode, or install the latest version (4.3.2, as of this writing).
So I tried that. It did not help; not on its own. But then I went a step further: I fired up Xcode.app, and once I had done that, I opened the Xcode..Preferences menu item, and then go to the Downloads tab, and say that you want to install the "Command Line Tools"
Once I did that, and then re-ran easy_install (in my case I was trying to "easy_install dulwich" to satisfy a hg-git dependency), it was able to properly find Python.h for me.
Might depend on what version of Mac OSX you have, I have it in these spots:
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h
/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h
Also I believe the version of python that comes with Xcode is a custom build that plays well with xcode but you have to jump through some hoops if you use another dev environment.
Are you sure you want to build Mercurial from source? There are binary packages available, including the nice MacHg which comes with a bundled Mercurial.