Skip to content

Instantly share code, notes, and snippets.

@dedemenezes
Created October 21, 2024 19:31
Show Gist options
  • Save dedemenezes/9a4e5ea329864352672bdf50d9a6c53f to your computer and use it in GitHub Desktop.
Save dedemenezes/9a4e5ea329864352672bdf50d9a6c53f to your computer and use it in GitHub Desktop.
git init
-> start using git in a new project folder
git status
-> check which files have been changed
git add filename
git commit --message "your message" || git commit -m "your message"
-> create a commit (save point)
git diff
-> check changes in a file
git log
-> see the list of all commits
git lg
-> short commits list
git remote -v
-> checks connections of git repository
gh repo create <name>
-> creates new repository on github
pwd
-> present working directory (where I am)
ls / ll
-> every file and directory in the folder
cd folder_name
-> moves into that folder
cd ..
-> moves back to parent directory
mkdir folder_name
-> creates a new folder
touch filename
-> creates a new file
rm filename
-> deletes a file
rm -rf folder_name
-> deletes a folder
mv index.html home.html
-> rename a file
mv index.html folder_name
-> move file to folder
code .
-> opens directory in vs code // sublime
open . / wslview .
-> opens directory in finder / file explorer
Ctrl + L
-> clears the terminal
Ctrl + C
-> cancel a terminal command
Keyboard UP
-> give the terminal previously written commands
Tab
-> terminal auto-completion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment