DEV Community

Cover image for Key Concepts of Git
Ibrahim S
Ibrahim S

Posted on

Key Concepts of Git

🔒Key Concepts of Git🌀

✅Repository ( Repo):
Repo is a storage space where our project's source code and its history are stored. It can be local(on my computer) or remote (on a server like GitHub).

✅ Commit:
A commit is a snapshot of the code at a specific point in time. It represents a set of changes to our code.

✅ Branch:
It allows you to work on different features or bug fixes simultaneously without affecting the main codebase.

✅ Merge:
Merging is the process of combining changes from one branch into another.

✅ Pull Request (PR):
PR is a way to propose changes to a repository. It includes a set of commits, & allows others to review and discuss the proposed changes before merging.

✅ Clone:
Cloning is the process of copying a repository from a remote server to our local machine. It allows to work on the code locally and contribute changes back to the repository.

✅ Fetch:
It is the process of getting the latest changes from a remote repository without merging them into your local branch. It allows us to review changes before merging.

✅ Pull:
Pull is a combination of fetch and merge.

✅ Push:
Push is the process of uploading our local changes to a remote repository.

✅ Remote:
A remote is a version of your repository hosted on another server. It can be on a platform like GitHub, GitLab, or Bitbucket.

✅ HEAD:
HEAD is a reference that points to the latest commit in the current branch. It represents the state of our working directory.

✅ Staging Area (Index):
The staging area is like a snapshot of the changes that we're planning to commit.

Top comments (0)