How to open the git terminal on mac?

I've installed git in /usr/local on my mac from but I'm confused about how to open the terminal.

9

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

I strongly recommend you use Homebrew to install git.

  1. install Homebrew
    ruby -e "$(curl -fsSL )"
  2. install git last stable version.
    brew install git

  3. open system terminal (the Mac OS build-in terminal)

  4. run git --version, You will see It!

About Homebrew.

4

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.

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-system

Step 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.

6

On your command line, type "git" then cd to the directory where your project resides.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like