Online Mind Mapping and Brainstorming

Create your own awesome maps

Online Mind Mapping and Brainstorming

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account? Log In

Git by Mind Map: Git
5.0 stars - 1 reviews range from 0 to 5

Git

A distributed version control system

Everything in Git is checksummed before it is stored

And referred to by that checksum.

SHA-1 hash is the mechanism used for checksumming

3 States

3 main states that files can reside

modified

staged

committed

3 Sections

3 main sections of any Git project

Working directory

Staging area

Git directory

Workflow

1. Modify files in working directory

2. Stage the files, adding snapshots of them to your staging area

3. Do a commit - which takes the files as they are in staging area and stores that snapshot permanently in Git directory

First time Git Setup

Git comes with a tool called 'git config'

The config vars are stored in 3 different places

Commands

git config --list

Getting help

Setting up a Repository

Add a project to a Git repo

Clone an existing Git repo(from other server)

2 stages

tracked

un-tracked

Checking the Status of files

$git status

tracking new files

staging changed files

Viewing staged and unstaged changes

Ignoring Files

files you don't want to add

or show as being untracked

.gitignore file

Committing your changes

$git commit

Skipping staging area

Removing files

Moving files

Viewing commit history

$git log

Undoing things

changing your last commit

unstaging a staged file

Unmodifying a modified file

Remote repositories

checking the remote for existing repo

adding remote repos

Fetching and Pulling from remotes

Pushing to remotes

Inspecting remotes

Removing and renaming remotes

Tagging

Listing your tags

Creating Tags

$git show [tag-name]