From 71c5fb6f920dafe258c2697358dbaa2385c66a2b Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 14 Jul 2022 16:40:28 +0200 Subject: [PATCH 1/2] This docu file would help the newbies to understand some stuff. --- Documentation.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Documentation.md diff --git a/Documentation.md b/Documentation.md new file mode 100644 index 0000000..dbce974 --- /dev/null +++ b/Documentation.md @@ -0,0 +1,18 @@ +## Documentation + +* [Terminal Commands](#terminal-commands) +* [Git Commands](#git-commands) +* [Glossary](#glossary) + +### Terminal Commands + +### Git Commands + +### Glossary +* Commit +* Branches +* Forks +* etc. + + +to be continued... From 06e23824663d82f69cc0e64ab63af0c60bbbef43 Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 14 Jul 2022 18:12:36 +0200 Subject: [PATCH 2/2] Added some helpful commands --- Documentation.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/Documentation.md b/Documentation.md index dbce974..a3e7d96 100644 --- a/Documentation.md +++ b/Documentation.md @@ -1,12 +1,45 @@ -## Documentation +## Documentation - WIP * [Terminal Commands](#terminal-commands) * [Git Commands](#git-commands) * [Glossary](#glossary) ### Terminal Commands +- `mkdir DirectoryName` - creates a new directory +- `cd DirectoryName` - goes to the wished directory +- `touch Demo.rb` - creates an empty file +- `echo "Some text" >> Filename.extension` - creates a file with some text in it +- `cat Filename` - shows what’s inside the file +- `open Filename` - opens the file from Terminal with the corresponding program/editor to edit the contents as you normally would +- `ls` - lists everything in the current folder except 'dotfiles'/hidden files (e. g. .gitignore) +- `ls -a` - lists verything (including the hidden files) +- `cd ..` - moves up to the parent directory + ### Git Commands +chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://www.badfv.de/files/Dokumente/tower_cheatsheet_dark_DE.pdf +- `git init` - creates a new local repo +- `git status` +- `git add ` - adds a single file +- `git add .` - adds all files in the directory +- `git commit` - you can enter your message on an additional screen +- `git commit -m "some message"` - you can enter your message directly +- `git branch` - which branches I have in the repo +- `git checkout -b ` - creates a new local branch and goes to it +- `git branch ` - creates a new local branch +- `git branch -d ` - deletes a local branch +- `git checkout ` - goes to the wished branch +- `git branch -M ` - renames your head branch ("head" = my current position) +- `git remote add origin ` - connects your GutHub repo with your computer +- `git pull` +- `git push` +- `git push ` +- `git remote -v` - lists all remote repos +- `git reset` +- `git reset --hard HEAD` - discards all local changes in the working copy +- `git log` - shows all local commits + + ### Glossary * Commit @@ -16,3 +49,4 @@ to be continued... +https://docs.google.com/document/d/1aSrEIcgZAemE_6Y6-_l2hheXvgzF3bCvQAbW_dlpifM/edit