In this Git course some very basic Unix commands will be used. This document describes ALL commands needed below.
ls: list all files/folders in current directorycd: change directory, e.g.cd testwill go to folder 'test'. To go one directory up, typecd ..cat: concatenate files, in our case we only use it to display the content of text file, e.g.cat my_file.txtprints the content of my_file.txt to the terminalsource: run script in the current shell, this means that all variables and functions defined in that file will be available in the current shellecho: display a line of text>: redirect ouput to file/device after>, overwrites already existing file>>: redirect output to file/device after>>, appends and does not delete already existing filemkdir: create directory/folder, e.g.mkdir testwill create directory 'test'touch my_file: creates the file "my_file"rm my_file: remove file "my_file"
In some Git commands (e.g. writing commit messages), the editor vim may open by default. Here are the very basic commands you need to know:
vim my_file: opens a new or an existing file with the name "my_file"i: switch to insert mode so you can type and edit textEsc: leave insert mode and return to command mode:w: save (write) the file:q: quit vim:wq: save and quit:q!: quit without saving