![how to setup git on mac terminal how to setup git on mac terminal](https://www.igeeksblog.com/wp-content/uploads/2021/04/Installing-Git-on-macOS-With-Homebrew.jpg)
GitHub is a highly popular Git service that allows you to use their service to upload your code to their web servers for version control rather than keeping everything local. This part of the article assumes that you are using a service called GitHub.
![how to setup git on mac terminal how to setup git on mac terminal](https://ykyuen.files.wordpress.com/2011/06/mac_install_git_osx_1.png)
git config -global user.name "GIT SERVICE NAME (NOT USERNAME)" - Sets your name globally for Git.git config -global user.email "GIT SERVICE EMAIL" - Sets your email globally for Git.For these steps, it is assumed that you are either in Terminal (OSX/Linux) or Git Bash/Command Prompt (Windows). There are a couple steps to get you up and running properly with Git so there are no hiccups.
#HOW TO SETUP GIT ON MAC TERMINAL INSTALL#
This will install Git, and you will be able to go from there. Linux usually comes with Git so it should already be there, but if it is not, type this into the terminal: sudo apt-get install git. But if you haven't, go to your terminal, and type in git. If you are running Linux, you most likely know what you are doing and have used Git before. Here is the link to the repository if you are having issues with the plugin for any reason: dahlbyk/posh-git. Side Note: While you may be able to use Git through the command prompt, I would highly recommend using Git Bash as it gives you information about the branch you are working on right in the terminal compared to command prompt which does not tell you any information, as well as you can use Linux commands.Ī kind user has told me that you can install a Plugin for PowerShell (Command Prompt) which will allow you to see branch information and commit differences just like Git Bash! To install, you must have Git installed already, and type in the following command in Command Prompt: Install-Module posh-git -Scope CurrentUser.
![how to setup git on mac terminal how to setup git on mac terminal](https://rafalab.github.io/dsbook/productivity/img/mac-screenshots/Screen-Shot-2018-04-11-at-10.35.44-AM.png)
This will install Git Bash which is a terminal emulator for Windows which will allow you to access Git. Go through the steps and keep the default settings as there is no reason to change them, unless you seriously know what you are doing. Go to this link: Download Git which is a link to the installer download. Windows does not come with Git, nor does it come with a built in way like OSX to install it without having to install additional software. Once it is done downloading, Git will be properly installed on your computer and you will now be able to use it from the command line. It should prompt you that you need to install Xcode Command Line Tools to actually install Git. If you have never used Git on your computer, you most likely will not have it installed.