Introduction to Git / GitHub
January 30, 2024
Version control - also known as source control or revision control - is an software development practice for tracking and managing changes made to code and other files.
VCS improves the following factors:
GitHub is a web-based hosting service for version control using Git.
GitHub is a web-based hosting service for version control using Git.
Workspace
: your working directory \(\rightarrow\) your computerLocal
: the local repository \(\rightarrow\) contains the history of your projectIndex
or Stage
: a buffer between Workspace
and Local
\(\rightarrow\) the list of files to be committedCommand:
add
: the command to add the file(s) to the list of tracked filescommit
: the command to validate a versionWorkspace
: your working directory \(\rightarrow\) your computerLocal
: the local repository \(\rightarrow\) contains the history of your projectIndex
or Stage
: a buffer between Workspace
and Local
\(\rightarrow\) the list of files to be committedRemote
: the remote directory \(\rightarrow\) Source of truth (shared by all)Command:
push
: Update remote refs along with associated objectsCommand:
push
: Update remote refs along with associated objectsfetch
: Download objects and refs from another repositoryrebase
: Reapply commits on top of another base tippull
: Fetch from and integrate with another repository or a local branch