GIT
  • What is a Version Control System ?
    • How Software would have been developed before '70s?
    • Expectations of a tool
    • Generation of Version Control System
    • The BitKeeper-Git-Mercurial Saga : How a License Agreement Change Shaped the Open-Source World
    • Mercurial was invented by andrew, then why Linus needs to create GIT
  • Git Installation and Initial Configs
  • Basic Terminologies
  • Q1 - Initialize a Repository and Basic Configurations
  • Q2 - Adding and Staging Files
  • Ways to Exclude Files in GIT ?
Powered by GitBook
On this page

Basic Terminologies

Repository (Repo):

A repository is a collection of files and version history managed by Git. It can be local (on your computer) or remote (hosted on a server).

It contains all the files and directories of your project, along with a special hidden directory called .git, which stores all the version control information, such as commit history, branches, tags, and configuration settings.

  • Local Repository: This is the repository stored on your local machine. When you initialize a Git repository in a directory, it becomes a local repository.

  • Remote Repository: This is a repository hosted on a remote server, typically on a service like GitHub, GitLab, Bitbucket, or a private server. Remote repositories serve as a central location where team members can share and collaborate on code.

Local: Your Local machine

Commit: A commit represents a snapshot of the repository at a specific point in time. It includes changes made to files and a commit message describing the changes.

Branch: A branch is a parallel version of the repository. It allows you to work on features or fixes without affecting the main codebase. The default branch is usually called "master" or "main".

Merge: Merging combines changes from different branches into one. It's often used to integrate feature branches back into the main branch.

Checkout: Checkout switches between different branches or restores files from a specific commit.

Merge Conflict: A merge conflict occurs when Git cannot automatically merge changes from different branches. It requires manual resolution by the user.


Remote:

In Git, a "remote" refers to a version of the repository that is hosted on a different server or location from your local machine. When you clone a repository, Git automatically creates a remote named "origin" that points to the original repository. However, you can configure multiple remotes if you need to work with multiple repositories.

Pull: Pulling is the process of fetching changes from a remote repository and merging them into the local branch.

Push: Pushing is the process of sending local commits to a remote repository. It updates the remote repository with your changes.

Clone: Cloning creates a copy of a remote repository on your local machine. It allows you to work on the code locally.

Remote: A remote is a version of the repository stored on a server, such as GitHub or GitLab. It allows collaboration with others by sharing code.

Fork: Forking creates a copy of a repository under your GitHub account. It allows you to freely experiment with changes without affecting the original repository.

Pull Request (PR): A pull request is a request to merge changes from one branch (typically a feature branch) into another (usually the main branch). It's commonly used for code review and collaboration.

PreviousGit Installation and Initial ConfigsNextQ1 - Initialize a Repository and Basic Configurations

Last updated 1 year ago