Skip to content

Instantly share code, notes, and snippets.

@made-by-chris
Last active September 7, 2022 17:09
Show Gist options
  • Save made-by-chris/ef9f4ce7bcd14b71a2f82c7cadc87f4e to your computer and use it in GitHub Desktop.
Save made-by-chris/ef9f4ce7bcd14b71a2f82c7cadc87f4e to your computer and use it in GitHub Desktop.
Handy Commands, Notes For Class

open the terminal quickly:

Windows WINDOWS KEY -> "git bash" -> HIT ENTER

Mac COMMAND SPACE -> "terminal" -> HIT ENTER

pwd -> print working directory -> "where am i?"

git init -> makes a repository in a folder which can track the contents. It makes a hidden .git file that you never need to touch (unless you wanna delete it).

mkdir -> make directory (folder) eg. mkdir my-project

cd -> change directory - moves us to a new folder cd moves use to our home user folder, cd projectsmoves us to our projects folder. cd ..

ls -> list stuff -> ls -a -> shows all stuff (including .hidden)

mv -> move or rename something - eg. mv porjeits projects

touch -> create a file

rm -> remove a file

cat -> concatenate -> print out the file contents

history -> history -> show me what my previous commands i typed

. -> "here"

.. -> "upstairs"

@absima
Copy link

absima commented Sep 5, 2022

  • to view a file

cat file1.txt

  • to concatenate files

cat file1.txt file2.txt > merged.txt

@made-by-chris
Copy link
Author

  • to view a file

cat file1.txt

  • to concatenate files

cat file1.txt file2.txt > merged.txt

genius :D i understand the meaning of the command after 15 years xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment