notecas.blogg.se

How to install git for mac osx sierra
How to install git for mac osx sierra













To find the location of the Git executable that's used by your current Terminal session. To update your PATH variable, edit the file ~/.bash_profile in a text editor and make sure that it includes something like this: export PATH=/usr/local/bin:$PATHĪfter saving this file, close your current Terminal window and open a new one - it should then use the new PATH setting. git -version git version 2.7. To find out, open a terminal and enter git -version. In fact, if youve installed XCode (or its Command Line Tools), Git may already be installed. You seem to be facing the problem that your Terminal is still using a different Git executable on the path. Install Git on Mac OS X There are several ways to install Git on a Mac. Just make sure that you update your PATH variable to include /usr/local/bin, since this is where Homebrew will install the Git executable. Once you have installed Homebrew, you can use it to install the latest version of Git: brew install git In the terminal, run the following command to install Xcode command line tools: xcode-select -install. The Homebrew Wiki has more installation options. From the Finder, select Go and click Utilities to display all the utilities. Installing Homebrew can be done like this: ruby -e "$(curl -fsSL )"Įxecute this in a Terminal, it will install Homebrew for your user. Once you have set up Homebrew, you can use it to install and update many other command line tools with a single command. I prefer using Homebrew over the dedicated download and install options like you used for Git. Thank you very much for yourtime and patience.īeta Was this translation helpful? Give feedback.To install Git without using Xcode, you can use Homebrew (which is great for installing other tools as well) - it comes highly recommended. My doubt is also: is Git wanting a ‘home’ directory where all of my repositories will be stored or once I drag a folder to GitHub Desktop / manage to initialise it via Terminal it will be connected directly? I have already installed GitHub Desktop so I already have a GitHub folder into my Documents directory but I wanted to try the Command Line way anyway.

Then I simply write $ cd \Users git init and press Return and I just get the title of the Terminal window changed to … while the book said I should get a ‘.git’ empty folder somewhere.Ĭould you tell me what am I making wrong?

When I do that on an Xcode project folder I get the error: ‘it is a directory’.

how to install git for mac osx sierra how to install git for mac osx sierra

I get asked to go to the directory I want to initialise in Terminal and to write its path followed by ‘git init’. “ Initializing a Repository in an Existing Directory ” The authors suggest doing everything via the Command Line (I am on macOS High Sierra 10.13.4) so I am following their instructions but … when I get to This is my first ever post and, please, forgive me if this sounds as a silly question but I have browsed many guides and posts and not found any solution to this.Īs a complete beginner with Git I am studying the ’ Pro Git’ book by Scott Chacon and Ben Straub.















How to install git for mac osx sierra