How to get started with Git on Mac

how to use git on mac
git for mac
github desktop
git bash for mac
download git for mac sourceforge
git-osx-installer sourceforge
git cli
git for mac catalina

I installed Git on my Mac but I do not know how to run it or access it. From the terminal I type git but it says "command is invalid."

I downloaded git from http://code.google.com/p/git-osx-installer/downloads/list?can=3 and I downloaded the package "Git Installer 1.7.3.5 - OS X - Leopard - x86_64."

UPDATE 1:

The content of the package is the following:

  • README.txt
  • git-1.7.3.5-x86_64-leopard.pkg
  • setup git PATH for non-terminal programs.sh
  • uninstall.sh

When I execute "setup git PATH for non-terminal programs.sh," I get the following messages:

No change to PATH in ~/.MacOSX/environment.plist ~ /Volumes/Git 1.7.3.5 x86_64 Leopard /Volumes/Git 1.7.3.5 x86_64 Leopard -MacBook-Pro:Git 1.7.3.5 x86_64 Leopard$ $PATH -bash: /usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec: No such file or directory

UPDATE 2:

The content of my profile file is the following one:

# System-wide .profile for sh(1)

if [ -x /usr/libexec/path_helper ]; then
    eval `/usr/libexec/path_helper -s`
fi

if [ "${BASH-no}" != "no" ]; then
    [ -r /etc/bashrc ] && . /etc/bashrc
fi

The git-osx-installer that you used should have installed git into /usr/local/git. See if you can cd into that directory. If you can, then check that your PATH was correctly set by running echo $PATH from the terminal and making sure that you see /usr/local/git/bin in the included PATH. If not, you need to add it to your PATH.

Did you run the included shell script setup git PATH for non-terminal programs.sh?

Update 1: How to run the included shell script
  1. Mount the git-osx-installer disk image by double-clicking git-1.7.3.5-x86_64-leopard.dmg, which should be located in your Downloads folder.
  2. Open Terminal from /Applications/Utilities/Terminal
  3. Type cd /Volumes/Git 1.7.3.5 x86_64 Leopard/
  4. Type ./setup git PATH for non-terminal programs.sh and hit Enter to run the shell script. Note: Once you type ./setup you can hit the Tab key and it will autocomplete for you.
  5. Open a new Terminal and type echo $PATH
  6. Confirm that you see /usr/local/git/bin in your PATH.
Update 2: Show Git Who's the Master

Open Terminal and issue the following commands:

echo "/usr/local/git/bin" > git
sudo mv git /etc/paths.d

When you run sudo it will ask for your OS X password.

After issuing those two commands, you should be able to open a new Terminal window and see /usr/local/git/bin when you run echo $PATH.

For this to work you have to have the following in /etc/profile, which it does by default:

if [ -x /usr/libexec/path_helper ]; then
    eval `/usr/libexec/path_helper -s`
fi

How to Install and Get started with Git on Mac, In order to use your git repository first you need to install Git. To install Git in Windows, read this article. In Mac OS the installation should be� Another easy way to get Git installed is by installing GitHub Desktop. The installer includes a command line version of Git as well as the GUI. It also works well with PowerShell, and sets up solid credential caching and sane CRLF settings. We’ll learn more about those things a little later, but suffice it to say they’re things you want.

Installing Git, Installing and configuring Git on macOS can seem difficult if you've never used a command line before, but there are only a few things to learn to get started. Confirm that you see /usr/local/git/bin in your PATH. Update 2: Show Git Who's the Master. Open Terminal and issue the following commands: echo "/usr/local/git/bin" > git sudo mv git /etc/paths.d When you run sudo it will ask for your OS X password.

Use MacPorts:

sudo port install git

Getting Started with Git & Creating your Repository, Install Git for Mac OS X, Windows or Linux here. If you have installed Homebrew to manage packages on OS X, you can follow these Start next tutorial� Git is a difficult subject to tackle for self-taught web developers who didn't learn to code with a team. If you've always worked alone and want an explanation of how to get started with Git, this tutorial is for you. I'm an egotistical bastard, and I name all my projects after myself. First Linux, now Git. - Linus Torvalds, author of Git

Either '/usr/local/bin' is not in your PATH or it just does not find git ...

Try this

$ PATH='/usr/local/bin'
$ export PATH

RESTART CONSOLE

try again - if it still does not work

  1. check if the location /opt/local/bin/git or /opt/local/bin/github exists (depending on your version)

if so:

2 . type

$ sudo ln -s /opt/local/bin/git /usr/bin/git

or

$ sudo ln -s /opt/local/bin/git /usr/bin/github (depends on your version)

3 . should work now

Working with Git on macOS • Beanstalk Guides, Getting started. This tutorial assumes you're using a Mac running at least OS X 10.7. If you are unsure of what OS you have, go up to the top left� To get started, you can create a new repository on the GitHub website or perform a git init to create a new repository from your project directory. The repository consists of three ‘trees.’ First is the working directory , which holds the actual files.

It may be easier to create a symbolic link from one of your default paths:

sudo ln -s /usr/local/git/bin/git /usr/local/bin/git

Install Git, FREE Courses - https://automationstepbystep.com/ Today we will learn 1. How to download and Duration: 18:53 Posted: Oct 12, 2016 Git Bash is a package that installs Bash, some common bash utilities, and Git on a Windows operating system. How to install Git Bash. Git Bash comes included as part of the Git For Windows package. Download and install Git For Windows like other Windows applications. Once downloaded find the included .exe file and open to execute Git Bash.

Beginner's Setup Guide for Git & Github on Mac OS X, We'll walk you through installing Git on macOS and configuring your identity. You' ll use Git Duration: 1:22 Posted: May 22, 2018 To get help from the community, review current user topics, join or start a discussion, log on to our Docker Desktop for Mac forum. To report bugs or problems, log on to Docker Desktop for Mac issues on GitHub , where you can review community reported issues, and file new ones.

Git and GitHub Beginner Tutorial 2 - Getting started, You can check whether Git is installed and what version you are using by opening up a terminal window in Linux or Mac, or a command prompt window in � The first time you use an attached physical device for iOS development, you need to trust both your Mac and the Development Certificate on that device. Select Trust in the dialog prompt when first connecting the iOS device to your Mac. Then, go to the Settings app on the iOS device, select General > Device Management and trust your Certificate.

Setting up Git on macOS - Bitbucket, Git is the most widely used version control system in the world today and is considered the modern standard for software development. How Git works. Here is a basic overview of how Git works: Create a "repository" (project) with a git hosting tool (like Bitbucket) Copy (or clone) the repository to your local machine

Comments
  • Where did you get the installer from? It is probably a question of ensuring the right directory is on your PATH, or that you're using the right command. I have a Mac, but I build git from source, so I know where I put it. That doesn't help you (beyond letting you know it is pretty easy to do).
  • Have you restarted your terminal? Not sure the PATH variable gets updated right away.
  • updated the question with little more information!
  • Where exactly is your git executable?
  • At any point during the installation process, did you see a screen like this: progit.org/figures/ch1/18333fig0107-tn.png ? If not, then you downloaded git without installing it...
  • I run and got the following: > cd /usr/local/git -bash: cd: cd: No such file or directory
  • @johndoe: you have to install the package as well as download it.
  • I just installed the package again now what should I do?
  • I can see the git folder in usr/local/git/bin now how should I run the git command.
  • @johndoe: Did you run the included shell script setup git PATH for non-terminal programs.sh? If not, I'd run that. Also, when you run echo $PATH from the terminal does it include /usr/local/git/bin?
  • I went to that link but that did not explain from the start! The link said download Git and it will magically start working. I think I am missing some paths or something.
  • Good link, but not the direct answer to the problem.
  • Well yes, that requires macports first. An alternative is homebrew. But as you will see, those will guide you through similar PATH setup as needed with the git package you installed. You'll have better value learning some basics on using the unix shell anyway.
  • @johndoe: That means that you don't have MacPorts installed. Personally, I don't use MacPorts, and it's not needed to solve your problem. I have git installed without problems using the same git-osx-installer that you used.
  • It's a bit inconvenient if you have to cd to the installation directory every time you want to use git.