Reference

Last updated on 2026-10-21 | Edit this page

Quick reference


pwd
print working directory
ls
list directory
  • -l: list file information
  • -lh: list human readable file information
  • -a: also list hidden files (names starting with .)
cd
change directory

Interacting with files in the shell

mkdir
make directory
touch
create an empty file
cat
send file or files to output (in most cases, print to shell)
head
output first parts of a file or files
tail
output last parts of a file or files
less
view a file one screen at a time (quit with q)
mv
rename or move a file or files. Syntax for renaming a file: mv FILENAME NEWFILENAME
cp
copy a file or files. Syntax: cp FILENAME NEWFILENAME
>
redirect output. Syntax with cat: cat FILENAME1 FILENAME2 > NEWFILENAME
rm
remove a file or files. NB: USE WITH CAUTION!!!

Git commands

Git cheat sheet handouts:

git init
create a new local git repository
git status
view the status of your files in the working directory and staging area
git add
tell git to start tracking a file, or a series of files
git commit
save file changes from the staging area permanently to the project history
git push
upload all commits to a remote repository, such as one on Codeberg
git log
show history of commits in reverse chronological order
git diff
show changes made to tracked files
git pull
download upstream changes and merge them into your local repository
git remote add origin
add a remote repository named ‘origin’, to upload changes to or download changes from

Codeberg

Issue
a task, question or problem report in a repository, with a discussion; can be open or closed
Label, milestone, assignee
ways to organise issues: by topic or status, by target date, by responsible person
Fork
your own copy of someone else’s repository on Codeberg
Pull request (GitLab: merge request)
a request to merge the changes from one branch (often in a fork) into another branch
Closes #1
in a pull request description, closes issue number 1 when the pull request is merged

Further reading


Useful Git repositories for research data management


  • dini-ag-kim/fdm-lernziele: Learning objectives matrix for research data management (LZM-FDM / LOM-RDM), developed and versioned in a Git repository; the learning objectives of this lesson are based on it.
  • the-turing-way/the-turing-way: Source of The Turing Way handbook, written collaboratively by hundreds of contributors with issues and pull requests.
  • citation-file-format/citation-file-format: Specification of the CITATION.cff file, which tells others how to cite the software or data in your repository.
  • frictionlessdata: Open standards and tools for describing and packaging tabular data (Data Package), developed on GitHub.
  • NFDI4Objects OER templates: Templates for creating FAIR open educational resources with Git, including a metadata schema.
  • Software Heritage: Archive that preserves the source code and history of public Git repositories, including those on Codeberg.