![]() ![]() You should also know that the -global option ensures that these values are used throughout your system. $ git config -global user.email Replace the name and email with yours. $ git config -global user.name "olawanlejoel" This is the username and email you used when setting up your version control system with GitHub, GitLab, and so on. These let you set your username and email. Two significant git config variables you need are the identity variables. This will give you access to configuration variables that control how Git works on your system. ![]() To work with Git, you must set up your Git environment using the git config command. So far, you have learned how to install Git – but installing Git alone doesn't just let you push, pull, and commit code and perform other Git operations from your Git Version Control. ![]() You can now verify by running the command below in your terminal: $ Git -version Once that is successful, you can proceed to install Git via the command below in your terminal: $ brew install gitĪt this point, if it's successful, you've installed Git on your Mac. Note: Once you enter the command, it will request your password. You only need to open the terminal and install Homebrew by running the following command: $ /bin/bash -c "$(curl -fsSL )" You don't need to install an application or anything to install Homebrew. You can use it to install all types of packages you will need in the future, not just Git. Homebrew is a free and open-source software package management system that simplifies software installation on Apple's operating system (macOS). You can find other methods and how to make them work in this documentation or here. There are so many methods available to install Git on a Mac computer, but the easiest is by using Homebrew. But if you don't and need an introduction to Git and version control, you can check out this article on What is Git? A Beginner's Guide to Git Version Control. I assume you already know what Git is and what it does before reading this article. This short article will help you understand how to set up Git on macOS so you can get back to work immediately. Maybe you just got a new laptop, or you're getting into tech for the first time with a MacBook. … and there you can edit it, pass export commands in new lines.If you're setting up Git for the first time on a MacBook, you don't have to struggle to get it done. Right click -> open with : Visual Studio Code (or other code editor). zshenv) file in your favored code editor (Sublime, Visual Studio Code, etc.).įinder -> User folder. If you can't memorise the nerdy commands for save and close in vim, nano etc (the way recommended above) the easiest way to edit is to open. If it's not existing, use this command to create the file: touch. Open terminal app and switch into user folder with simple command: cd If it's not existing, you have to create. To show hidden files in Mac OS Finder: Press: Command + Shift +. Remember: Files with a point at the beginning '.' are hidden by default. bash_profile file should be findable there. bash_profile file isn't there by default. It should contain commands to set up aliases, functions, options, key bindings, etc. zshrc: Sourced in interactive shells only. Often contains exported variables that should be available to other programs. bash_profile on Mac, please be aware that since macOS Catalina zsh (z shell) is the default shell. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |