ποΈ Introduction
Welcome to the Git handbook.
ποΈ Basics
Version Control
ποΈ Fundamentals
Initialization
ποΈ Branching
Branching in Git allows developers to create separate lines of development, making it easier to work on new features, bug fixes, or experiments without affecting the main codebase.
ποΈ Remote Repositories
Remote Name
ποΈ Flags
| Symbol | Meaning |
ποΈ Collaboration
Forking
ποΈ git Folder
Structure
ποΈ Merge Conflict
A merge conflict occurs in version control systems like Git when two or more branches have made changes to the same part of a file, and Git cannot automatically determine which changes to keep. Since Git relies on context to merge changes, conflicting edits in overlapping regions or different actions on the same file (e.g., one branch deletes it while another modifies it) require manual resolution.
ποΈ Stashing
When working on a Git repository, sometimes you might need to switch branches or pull updates, but you have uncommitted changes that you donβt want to commit yet. Instead of committing incomplete work, you can temporarily "stash" your changes using git stash.
ποΈ Cleanning
When working in a Git repository, you may end up with untracked files (files that are not yet staged or committed). These can clutter your working directory, especially after switching branches or running builds that generate temporary files. Git provides the git clean command to remove untracked files and directories safely.
ποΈ Rebase
Git rebase is a powerful command that allows you to integrate changes from one branch into another by moving or rewriting commit history. It is an alternative to git merge, but instead of creating a merge commit, it rewrites the commit history to keep it linear.
ποΈ Reset
It is used to undo changes by moving the HEAD (current branch pointer) to a different commit. It allows you to remove commits, unstage changes, or discard modifications in the working directory.
ποΈ Revert
It is used to undo the changes introduced by a specific commit by creating a new commit that reverses those changes. Unlike git reset, which can alter commit history, git revert is safe for public repositories and works by adding a new commit that undoes the effect of an earlier commit, leaving the history intact.
ποΈ gitignore FIle
.gitignore forces files to be untracked. Files that we do not want to share are described inside .gitignore.
ποΈ Version Control Introduction
What is a Version Control System (VCS)?