git, originally developed in 2005 by Linus Torvalds, is the de-facto industry standard VCS
(version control system). It’s a DVCS, with D for being a Distributed Version Control System,
opposed to once-popular VCS like CVS or SVN (Subversion).
advantages of git
- incredible speed, much faster than SVN or CVS.
- optimized storage. I remember checking out a single version with SVN used 5 to 10 times
the storage of a whole comparable project as a git repo with all branches and the full
history on my machine.
disadvantages of git
- very complex command set.
- documentation is often counter-intuitive.
These two disadvantages result in a steep learning curve.
The articles in this section deal with git in bash. I prefer to use git in a terminal and
not having an IDE in the way. However, the git concepts described here apply no matter if
you use git with your IDE or in bash.
| created on | October 28, 2023 |
| last modified on | May 6, 2026 |
overview of a git repo The following picture shows the structure of a git repo and illustrates the flow of data between the repo’s components. The arrows also illustrate the workflow when working with git, with each arrow labeled with the corresponding git command (i.e. add for the command git add):
...
| created on | June 22, 2022 |
| last modified on | June 28, 2022 |
how to customize git in bash for a more comfortable and efficient working experience...
| created on | June 22, 2022 |
| last modified on | October 28, 2023 |
configuration of git after initial installation with settings for users, repos and system wide settings...
| created on | June 22, 2022 |
| last modified on | June 28, 2022 |
how to revert staged and unstaged changes while working with git...
| created on | June 22, 2022 |
| last modified on | October 27, 2023 |
viewing the commit history with git log with custom formats for more information on less terminal real estate...
| created on | June 22, 2022 |
| last modified on | June 27, 2022 |
basic operations create a branch – git branch <new branch> checkout a branch – git checkout <branch> list local branches – git branch list remote branches – git git branch -r list local and remote branches – git branch -a delete a local branch – git branch -d <branch> delete a remote branch – git push origin -d <branch> create and checkout a branch in one go git checkout -b <new branch> connecting local branches to upstream git push -u origin new-branch -u is shorthand for --set-upstream
...
| created on | October 25, 2023 |
There are three ways for creating an archive from a git repo: git archive, git bundle, and plain tarballs. Spoiler: as long as you want to archive the local repo in its current state –that is with uncommitted changes– making a tarball from a git repo is not only the most simple way to create an archive from a git repo, but also the best one.
...