Tech, compressed

Small tutorials on various development/sysadmin tools

Branching and Merging - Intro to Git Part 4

Back to Series If you’ve followed along with the previous tutorials, you now know how to work with commits, stage files, view the commit log, and maybe a few other things. Now it’s time to use one of git’s most useful features: branching. What is a branch? In reality, a branch is just a named pointer to a commit. But for most purposes, thinking of a branch like a branch of a tree is fine....

August 28, 2020 · 3 min · Kian Kasad

Staging Areas - Intro to Git Part 3

What are staging areas? When you run git status after modifying some files, you’ll see something like this: On branch master Changes to be committed: (use "git restore --staged <file>..." to unstage) modified: file1.txt modified: file8.txt Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: file2.txt modified: file4.txt Untracked files: (use "git add <file>....

August 25, 2020 · 5 min · Kian Kasad

Basic Commands - Intro to Git Part 2

Part of the Intro to Git series. Installing Git You can find Git in basically every package manager in existence. If you don’t use a package manager, you can get git from the official downloads page. This tutorial uses git version 2.x.x. Check which version you have by running $ git --version Creating a repository To create a git repository in the current directory, use the init subcommand: $ git init This command will create the ....

August 23, 2020 · 4 min · Kian Kasad

Gitting off the Ground - Intro to Git Part 1

Part of the Intro to Git series. What is Git? Git is the world’s most popular version control software. But that raises another question; what is version control? Version control is a system of saving changes to files in steps. In Git, these steps are called ‘commits.’ When you use version control, all changes to your codebase are kept and are organized for you. This is extremely useful if you want to do something like roll back a change, or pinpoint when a bug was introduced....

August 22, 2020 · 5 min · Kian Kasad

Using Git Submodules

If you’ve ever tried to add a Git repository within another Git repository, you may have gotten a confusing message like this: warning: adding embedded git repository: another-repo hint: You've added another-repo git repository inside your current repository. hint: Clones of the outer repository will not contain the contents of hint: the embedded repository and will not know how to obtain it. hint: If you meant to add a submodule, use: hint: hint: git submodule add <url> another-repo hint: hint: If you added this path by mistake, you can remove it from the hint: index with: hint: hint: git rm --cached another-repo hint: hint: See "git help submodule" for more information....

August 22, 2020 · 2 min · Kian Kasad