erger.blogg.se

How to install git for mac osx sierra
How to install git for mac osx sierra













If you re-run git status you'll see that all the files in your project are now under the heading "Changes to be committed". Any files in this staging area will be included in the next commit which you make. This command will add all files in the directory to our staging area. This means they haven't yet been added to our Git repository and in order to commit them, we will need to add them. In this last image, you can see that we have a number of untracked files. This allows you to see which files have recently changed or which exist in your local directory but haven't yet been added to your repository. Once the repository has been initialized, you can now run the git status command which will show you the current status of your repository. You don't really need to worry about this as you'll rarely need to go into this directory and most of the files in it are managed for you by Git. This repository will be stored in a hidden folder named. Running this command will initialize a new empty repository in our project directory. Let's now go ahead and initialize our repository. If you run the ls command, you'll see that we have a number of folders & directories in our project which we want to add to our Git repository.

how to install git for mac osx sierra

The first thing we need to run in our terminal is run a command to move our current working directory to our project. We'll call this project potato and it will be saved in your home directory in a folder named Development. We're going to assume that you have an existing project which you wish to import into a Git repository. $ git config -global user.name "Your Name Here" $ git config -global user.email Initializing your first repository This information is used whenever you make a commit so that everyone knows who made the changes. The first thing you should do before using Git for the first time is to set your name & e-mail address in the Git configuration.

  • Navigating the Terminal - from TutsPlus.
  • An introduction to the Mac OS X Terminal - from the Treehouse blog.
  • If you're already comfortable moving between directories using cd then you can skip these. If you've never used a terminal before, there are some great tutorials about how to get started with this.

    how to install git for mac osx sierra

    You can find this by opening up your Applications folder, then your Utilities folder and finally the Terminal application.

    how to install git for mac osx sierra

    Accessing the terminalįirstly, you'll need to open up the Terminal application. In this guide, we're going to use the command line.

    how to install git for mac osx sierra

    The command line option is often quicker and means that you can gain a better understanding of how things work and what exactly you are doing. You can either use Git on the command line using a terminal or you can install a graphical interface. Fortunately, modern Macs all come with Git installed as standard so there's no need to worry about installing it. In this guide, we're going to explore how to use Git on the Mac OS X operating system.















    How to install git for mac osx sierra