Skip to content

Latest commit

 

History

History
90 lines (47 loc) · 2.39 KB

File metadata and controls

90 lines (47 loc) · 2.39 KB

Git

Git is a DVCS that stores data in a file system made up of snapshots

1. Local Operations

Git mostly relies on local operations because most necessary information can be found in local resources

2. Tracking Changes

Every single change applied to any file or directory is tracked by Git. And, as the gatekeeper, Git will always detect file corruption or loss of information in transit

3. Loss of Data

Git is set up to greatly minimize the possibility of irreversible damage to files, such as accidentally lost data. Git makes it extremely difficult for a snapshot of your file that is committed to be lost

4.States

Files in Git can reside in three main states: committed, modified and staged.

  • Committed

Data is securely stored in a local database

  • Modified

File has been changed but not committed to the database

Top courses in Git

1.crash cours 2.bootcamb 3.the denefitive 4.master git and github

Staged

Download Git

In order to use Git, your computer must have it available. If you already have Git on your computer, you should make sure you have the latest version.

ways to install git

-Install as a package

-Install via another installer

-Install via another installer

after download you can do these steps

1.Importing 2.Cloning

Workflow

Local Repository Structure

The local Git repository has three components:

1.Working Directory: The actual files reside here. 2.Index: The area used for staging 3.Head: Points to the most recent commit

Local Repository Structure

Saving Changes

All files in a checked out (or working) copy of a project file are either in a tracked or untracked state.

-Tracked

Tracked files can be modified, unmodified, or staged; they were part of the most recent file snapshot.

-Untracked

Untracked files were not in the last snapshot and do not currently reside in the staging area.

The Life Cycle of File Status

1.After you edit a file, Git flags it as modified because of changes made after the previous commit 2.You stage the modified file. 3.Then, you commit staged changes.