I've installed git in /usr/local on my mac from http://git-scm.com/download/mac but I'm confused about how to open the terminal.
5 Answers
Bash is shell. In mac you already got Bash but in windows you get Bash when you install git. So in mac you will use terminal for your git, but in windows you get separate git terminal. I think that's why you are confused.
when you type
git --version if u see it is already installed so you are ready to use the git in your terminal
Comments
I strongly recommend you use Homebrew to install git.
- install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" install git last stable version.
brew install gitopen system terminal (the Mac OS build-in terminal)
run
git --version, You will see It!
About Homebrew.
4 Comments
ImageMagick, tree, GNU Parallel, gnuplot, doxygen, fswatch...homebrew one will be installed in /usr/local/bin. The Apple-supplied one will be in /usr/bin. So, if you want the homebrew one, use /usr/local/bin/git. If you want the Apple-supplied one, use /usr/bin/git. If you just want to only ever type plain old git, choose once which one you want that to refer to and put that first in your PATH.I use Windows, where Git bash is the application that I use to use git commands. On my mac, however, the Terminal application is used for Git commands like Git Bash on Windows. I was a bit confused as to why I could not find a Git Bash version for Mac anywhere on Git's site. It turns out that Git commands are all executed in the Mac terminal application, Terminal. As said above, first check that you have installed Git correctly with running this in the Terminal:
git --version And then if a recent version of git is spat out from the Terminal, then you can start using normal git commands like how one would use in Git Bash, like these:
git clone YOUR_REPOSITORY or
git checkout OTHER_BRANCH I hope that this helped.
Comments
It sounds like you have not performed steps 2 and 3 from the README.txt file:
Step 2 - Remove stubs
In later versions of OS X (Yosemite and onward), you'll probably see a message like the following:
'The "git" command requires the command line developer tools. Would you like to install the tools now?"This is because OS X has started to ship with stubs; in order to stay nice and easy-to-uninstall, the git installer places all of it's assets under
/usr/local/git. As a result, the git in /usr/local/git/bin/git takes second place to /usr/bin/git.sudo mv /usr/bin/git /usr/bin/git-systemStep 3 - Restart bash sessions
This include GNU screen sessions, TMUX sessions, etc. If you wish to preserve your precious screen session, just
source /etc/profile.
Ctrl-D.