learning-journal

Kyle's Learning Journal


Project maintained by AtkinsonKyle Hosted on GitHub Pages — Theme by mattgraham

The Fundamentals of Git


Words That Would Be Helpful to Know

What On Earth Is a Git?

Git is a distributed version control system that stores data in a file system made up of snapshots. It creates the snapshots and essentially saves them. Git primarily relies on the local side of the house because most important information comes from local resources which eliminates the need to return history information from a server and allows one to work on a project. Git is like a gatekeeper! Changes applied to any file or directory is tracked by it.

First Run Customizations

After installing Git, you should set your user name and email address, which will be used for every Git commit. Type the following into the Command Line:

To confirm that you have the correct settings, enter the following command:

Repositories For Beginners

Importing

To import existing projects into Git, follow these steps using the command line:

  1. Switch to your project’s directory
    • cd test
  2. Use the git init command
    • git init
  3. To start tracking these repository files, perform an initial commit by typing the following:
    • git add *.c -git add LICENSE -git commit -m “any message here”

Structure

The local Git repository has three components:

  1. Working Directory(the actual files reside here)
  2. Index (staging area)
  3. Head(the most recent save)


Download Git Download Github Desktop GUI Clients