Coder Social home page Coder Social logo

hs-git-environment-setup's Introduction

Ready, set, git!

Git and GitHub are very important to the productivity of a developer. In a nutshell, they help you save all of your work and share it with other coders. You'll be learning a lot more about git and GitHub, but first let's git you all set up. (Forgive the pun!)

If you are using a Chromebook, ignore these instructions. You will not be using Homebrew, and you completed the rest of these steps when you received your computer.

If you have Yosemite installed on your computer, you will need to manually install the command line tools first, by typing into terminal xcode-select --install

###1. Update Git

To see what your current version is, enter git version into your command line. To update and make sure you are using the most current version, enter brew install git.

###2. Git Tab Autocompletion

This is a super handy shortcut, we'll explain how this works more in depth, but git can autocomplete words for you.

brew install bash-completion

###3. Set Up a .gitconfig File

a .gitconfig file is a file that automatically logs you in to git through terminal. This will be incredibly helpful later on.

  • Make sure you're in the correct place before we create this file by entering the command cd ~.

  • Enter touch .gitconfig, then open .gitconfig.

  • Copy and paste the Flatiron School Gitconfig into this file.

  • You're going to need to replace some values with your own information from GitHub including:

    • The email address that you used to register for GitHub, where you see <GITHUB EMAIL ADDRESS>. You'll be replacing the whole thing, you don't want any of the < > angle brackets around the information you enter.

    • Your GitHub username and API token. This is how you find and generate API tokens on github.com:

      • On https://github.com/settings/applications, next to "Personal access tokens" you should see a button for "Generate new token". Click on it.
      • Under "Token description" enter 'flatiron-school', then click the green "Generate token" button.
      • Once the screen refreshes, you'll see a token (a series of randomly generated letters and numbers). Copy that and paste it into your .gitconfig file, replacing <API token>. (It's in a couple of places. Don't forget to replace the < > angle brackets, too.)
  • Now scroll all the way to the top of the file and replace the text <YOUR_HOME_DIRECTORY> with the name of your computer user. You can type pwd in terminal to see your computer username and figure out what you need to type in.

  • Finally, you don't want any of the < > angle brackets around the things you replaced, like your email, username, or tokens, so make sure you replaced everything properly.

###4. Set Up a .gitignore File

A .gitignore file basically tells GitHub not to keep track of certain files.

  • Make sure you are in the home directory. You should see this ~ in your command line. If you're not there, enter cd ~.

  • Enter touch .gitignore, then open .gitignore.

  • Copy and paste Flatiron School's Gitignore.

Congrats!

Phew! That was a lot of work, but now you are all set to use git and GitHub. Now, git 'er done!

View Ready, set, git! on Learn.co and start learning to code for free.

hs-git-environment-setup's People

Contributors

fislabstest avatar fs-lms-test-bot avatar stephaniecoleman avatar vanessadean avatar victhevenot avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.