GitLab: Your unlimited note-taking and knowledge base app
Free, unlimited, and better compared to Google Drive and Microsoft Sharepoint
Last updated: 09 Nov 2021
We all take notes in life: college lectures, personal research for best deals, personalized food recipes, and more.
In this article, we will create a home inventory system, because that is the simplest form of note-taking or knowledge base. You might also be excited that this particular home inventory system efficiently keeps your home organized; virtually zero effort, consistently clutter-free.
3 features make your notes infinitely more valuable:
- They’re cloud-based
Keeping them on the cloud means you can access them everywhere.
See a shop selling discounted can openers? Check your home inventory to see whether you already have one at home!
- They’re version controlled
Whether you’re working alone or in a team, version control let’s you write notes quickly, without planning paralysis nor fear of accidental overwriting.
No one in the household can accidentally erase/overwrite important notes in your home inventory system.
- They’re updated collaboratively by a team
Working together is synergistically and exponentially more productive than working alone.
Your entire household can add items to your home inventory system. No more buying one can opener for each member of the family!
GitLab has all 3 features for free.
Let’s get started on GitLab right away! Create an account at GitLab.com, login, and read on!
Projects let us collect and organize our notes
We create a project in our GitLab account. Click on the button “New Project”, near the top of your GitLab account page.
Click on “Create blank project”.
Give your project a name, such as “Home Inventory”.
Set your project’s visibility to “Private”.
Uncheck (deselect) the option for an initial
README file. (You also won’t need SAST, since you won’t be doing any programming in your note-taking or knowledge base project.)
With all fields filled up appropriately, click the “Create Project” button.
Our first file
Our project is now still empty. We create our first file in the project.
Click on “New file” button. You’ll enter the Web IDE graphical user interface (you can’t use any others for the first file).
By default, you’ll start committing your work on the
main branch (blue highlight). Click on the “New file” icon (red highlight), or the equivalent “New file” green button.
The name of our first file must be exactly
README.adoc. Click “Create file” button to create this first file.
We’ll be using the Asciidoc format; just follow our simple example for now (we’ll explore Asciidoc via fun deep dives in other articles).
Type these 3 lines into our first file. The first line is the document title, the second automatically generates a table of contents, and the third allows us to manually insert line breaks within paragraphs (we’ll later see why this is useful).
How do we save these 3 lines into our first file? Our first file isn’t even actually created yet. Let’s save this new file.
Commit your work
All your work on GitLab is saved by “commits”. Each commit is like one checkpoint or savepoint.
Commit this first piece of work — 3 lines in Asciidoc format — by clicking on the “Commit” button. GitLab also indicates that 1 file is changed — our new file that is yet to be created.
Ever had Google Docs save hundreds of versions of your document and you can’t tell which version contains what? This is where annotation of each savepoint comes in useful.
Annotate your commit, then click the “Commit” button below.
Click on the project name at the top-left of your screen to exit the Web IDE user interface.
You should see your first file
README.adoc in your Files Viewer (Sidebar:
Files); the Sidebar is on the left, and you can expand/collapse it.
Our first home inventory box
Let’s start using our home inventory system right away! We create our first box.
In the Files Viewer, click the “Add” dropdown (scan right from branch name
main near top-left of your screen) that gives us the option to create new files/directories. Click on “New file”.
Create a new file named
Home Inventory System tip: We should not be having more than 99 boxes. If we do, it may be time to consolidate some of the boxes into bigger boxes.
Type in the usual first 3 lines:
Commit this new file. (We’ll gain access to a Preview function soon after, not now.) Annotate the commit with “Add Box 01”, target
main branch, and commit.
Now we can add items to Box 01. Click “Edit”.
First, we need to describe how to access this box. Use the line numbers on the left to know where we are in the document. (Asciidoc format allows only one top-level section: the title that is denoted with a single
=. All other sections are
== or lower.)
Home Inventory System tip: Don’t shift the box around once you’ve documented how to access it!
Our first home inventory item(s)
We add our first home inventory item into our first box.
Home Inventory System tip: Fields like “Model” and “Price” don’t have to be consistent. Let your household naturally firm up such fields/formats over time. Keep your item entry free-form and fast to type in; don’t discourage usage of the system.
For good measure, and also to showcase the automated Table of Contents, we add a second item into the box. (The single
= error is intentional. In the next article, we will correct this typo as we demonstrate collaborative updates to projects.)
Home Inventory System tip: No need to arrange items neatly in the box. Dump them in, pack them tight for maximum space use. Frequently used items — less than 5% of our total possessions, usually — should be in convenient drawers instead.
Before we commit these 2 items, let’s look at the preview of our document. Click on “Preview”. (Preview only works when editing files, not when creating new files.)
You’ll see the automatically generated Table of Contents, and your file contents beautifully formatted. Asciidoc is a competent format.
Now, commit your entry of the 2 items.
Searching through your boxes
Now, we see how GitLab allows us to “rummage” through our boxes in a split second. Let’s search for “can opener”, via the search box at the top-middle of the screen. Choose the first search option to limit the search to our project.
We find 2 can openers. This allows you to tell your household something like “nobody buys another can opener, please check our inventory first!”.
Version Control: Know who changed what
Open the Version Graph (Sidebar:
Graph). You’ll see 3 commits:
Clicking on the 2nd commit will show you what changed in that commit.
Version control lets you track exactly who changed what.
We’ve seen how GitLab lets your notes be cloud-based, as well as version controlled.
In another article, we’ll be exploring how to properly use GitLab for collaborative update of a project. (TODO: Write this article!)