![git on mac xcode git on mac xcode](https://support.rstudio.com/hc/en-us/article_attachments/203718287/Screen_Shot_2015-11-09_at_4.59.40_PM.png)
If you have not taken a look at Xcode’s support for Git, you may be surprised how much you can accomplish.
![git on mac xcode git on mac xcode](https://i1.wp.com/techsprobe.com/wp-content/uploads/2020/01/macOS-10.15-2020-01-15-21-29-57.png)
So far I have been pleasantly surprised at what all Xcode can do with Git. So, I decided to attempt to use Xcode exclusively to interact with Git and share my results.
![git on mac xcode git on mac xcode](https://www.edwardthomson.com/blog/images/gittf-1.png)
I find very few developers use Xcode for even some basic Git tasks, and many developers are not aware of the Git support Xcode offers.įor my own workflow, I like to minimize the number of tools used and number of switches between apps needed to complete a task. When I ask other iOS and Mac developers how they interact with Git, most say they use the command line or a separate desktop app like Tower. There are a number of desktop apps that can perform these functions, including Xcode. Git comes with a set of command line tools to check status, commit changes, view logs, make and merge branches, and coordinate commits with a remote repository. You can easily fix this problem updating the developer directory to the Xcode.app like this: sudo xcode-select -s /Applications/Xcode.Git has become a very popular version control system in iOS and Mac development.
![git on mac xcode git on mac xcode](https://chrishannah.me/content/images/2019/01/Image-3.png)
This error occurs when the xcode-select developer directory was pointing to /Library/Developer/CommandLineTools when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode). If you are working with Node.js and some module that requires node-gyp, you may find the following warning in your terminal: xcode-select: error: tool 'xcodebuild' requires Xcodeīut active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance Solution for xcode-select: error: tool 'xcodebuild' requires Xcode Personally, it's kind of ridiculous that the command line tools aren't installed by default but, anyway. In my case, I was simply cloning a repository with Git and it worked as expected. The installation will take a while, once it finishes, launch a new terminal (close any opened terminal) and try doing whatever you were doing before.
#GIT ON MAC XCODE INSTALL#
Running this command will print the following text in the terminal: xcode-select: note: install requested for command line developer toolsĪnd will launch a prompt asking for confirmation to install the command line developer tools, be sure to install it: To solve this problem, simply run the following command in your terminal: xcode-select -install The exception is caused because of the missing developer command line tools in your system. So I had to mess up directly with the command line. Some developers have claimed that this prevent this kind of error from appearing:Īlthough some people say that updating XCode fix their problem, it didn't work in my case.
#GIT ON MAC XCODE UPDATE#
#GIT ON MAC XCODE HOW TO#
After some research I ended up with a solution and I want to share with you the cause of this problem and how to solve it. This time, I tried to simply clone a repository using Git and the error showed up. I didn't touch my mac for a while and suddenly when I try to work doing something very basic on it, the task surprisingly fails.