ANDREAS SCHIPPLOCK
Programmer, Linux user since ~2000.


Your first commit

First create a test repository at GitLab.

Clone that repository:


git clone git@github.com:$username/test-repository.git
Now create a README.md or make changes to it:


cd test-repository
echo "# Headline 1" > README.md
Stage this file:


git add README.md
Your editor will be started. For now just add:


added/modified README.md
Save the file, exit your editor and the file will be committed.

You will get an output similar to this:


[master (root-commit) 0ca4277] added README.md
1 file changed, 1 insertion(+)
create mode 100644 README.md
Take a look at the first line. There you will find your "revision". In this case it's 0ca4277 and it's already the short form. Just remember it for now.

You may want to push your changes now:


git push -u origin master
If everything went fine, your changes will be visible inside the repository.