Concepts of VCS
Repository
A repository, often referred to as a "repo," is a central location where Git stores all the files, history, and metadata of a project.
Commit
A commit is a snapshot of changes made to the repository.
It represents a logical unit of work and includes a unique identifier, a commit message describing the changes, and a reference to the previous commit.
Checkout
The act of switching to a different branch is called checkout.
It allows developers to work on a specific branch and access its code and history.
Merge
Merging combines the changes from one branch into another.
It integrates the commits of a source branch into a target branch, incorporating all the changes seamlessly.
Push
The push term refers to upload local repository content to a remote repository.
Pushing is an act of transfer commits from your local repository to a remote repository.
Pushing is capable of overwriting changes; caution should be taken when pushing.
Pull
When working collaboratively, a developer can request changes from their branch to be merged into another branch through a pull request.
This process allows for review and discussion before the merge takes place.
Clone
Cloning is the process of creating a local copy of a remote repository. Developers can clone repositories to their local machines to work on the code and contribute to the project.
Fork
A fork is a new repository that shares code and visibility settings with the original “upstream” repository.
Fetch
Fetching retrieves the latest changes from a remote repository without integrating them into the local codebase.
It updates the local repository's knowledge of the remote repository's state.
Conflict
Conflicts may arise when merging or pulling changes if two or more developers modify the same part of a file.
Git provides tools to help resolve these conflicts manually by choosing which changes to keep.
Staging
Git uses a staging area (also called the "index") to prepare files for commit.
Developers can selectively stage specific changes or files, controlling which modifications will be included in the next commit.
Ignoring
Git allows developers to specify files or patterns to ignore, ensuring that certain files, such as compiled binaries or sensitive information, are not tracked or committed.
Tags
Tags provide a way to mark specific points in Git history, such as release versions or important milestones.
They allow for quick reference to specific commits, providing a more user-friendly identifier.
Remote Repository
A remote repository is a copy of the repository stored on a server or hosting platform. It allows for collaboration and synchronization among multiple developers.
Rollback
An administrator can roll back the code repository to a previous commit -- that point-in-time copy -- in several ways, depending on the end goal.
Github SSH
Secure Shell (SSH) Protocol facilitates the communication among systems in an unsecured network by providing a secure channel over it.
It safeguards the connection to remote servers enabling user authentication.
Using SSH, you can connect to your GitHub account eliminating the need of giving username and password each time you push changes to the remote repository.
The integration process involves setting up SSH Keys within both the local and remote systems.
Revert
git revert is used to record some new commits to reverse the effect of some earlier commits (often only a faulty one).
Reset
The git reset command is used to undo the changes in your working directory and get back to a specific commit while discarding all the commits made after that one.
Last updated