DEV Community

richardmuzungu
richardmuzungu

Posted on • Edited on

GIT ARTICLE

Version control

Version control is a system tracking changes to files overtime, people work on the same project and can track previous versions if something breaks.
Version control using git means maintaining a complete history of changes made to the project by who, when and why by takung snapshots called commits.
Git is an example of a version control(keeps history, allows branching and merging, allows users develop a project.

Two ways to move codes in github, they include;

  • git pull

  • git push
    GIT PULL
    Helps one download changes from remote repository and integrate them into your local branch
    GIT PUSH
    Used to upload local commits to a remote repository like github

    TRACKING CHANGES IN GIT

    Is the process by which systems like git monitor files to detect changes and record history. Every file exists in two states namely; untracked and tracked files.

    - untracked files

    These are files that git knows they exist in a folder but they will not be included in your history or backups until you tell it.

    - tracked files

    These are files that were part of your last commit. Git also monitors any modification

    STAGES OF TRACKING

    They include;

1. Modified/working directory
User edits files but changes are not tracked. Git sees the changes but has not registered them.

2. Stage/staging area
Stores information about what will go into your next commit. Like gathering all changes before going to the next step.
3. Repository
It is the last stage and where git stores the data permanently.

Version control enables one to revert entire/individual files to previous stable state if anything is wrong(reversibility). Users create independent lines of development. allows experimentation without affecting the main project(branching) also people are able to work on project concurrently(collaboration)

Top comments (0)