Action | Shortcut (Windows) | Shortcut (macOS) |
---|---|---|
Switch between apps | ALT + Tab | Command + Tab |
Birds-eye view of apps | Windows + Tab | Mission Control (Control + Up Arrow or swipe up with three fingers) |
Copy & Paste | CTRL + C and CTRL + V | Command + C and Command + V |
Find text in file | CTRL + F | Command + F |
Move cursor one word | CTRL + <- or -> | Option + Left or Right Arrow |
Start of line | Home | Command + Left Arrow |
End of line | End | Command + Right Arrow |
Delete forwards | Delete | Delete (or fn + Delete for some keyboards) |
Delete whole word | CTRL + Backspace | Option + Delete |
Delete word forwards | CTRL + Delete | Option + fn + Delete |
Select text | Shift + <- or -> | Shift + Left or Right Arrow |
Select words | Shift + CTRL + <- or -> | Shift + Option + Left or Right Arrow |
Add cursor to word | Highlight word + CTRL + D | Highlight word + Command + D |
Open command dialog | CTRL + Shift + P | Command + Shift + P |
Comment | CTRL + / | Command + / |
Command | Description |
---|---|
git init |
Initialize a new Git repository |
git clone [url] |
Clone (or download) a repository from an existing URL |
git status |
Check the status of your changes |
git add [file-name] |
Add a file to the staging area |
git add . |
Add all new and changed files to the staging area |
git commit -m "[commit message]" |
Commit your changes |
git rm [file-name] |
Remove a file from the working directory and staging area |
git log |
View recent commits, including author and date |
git push [remote-name] [branch-name] |
Push your code to the remote repository |
git pull [remote-name] [branch-name] |
Pull and merge changes from the remote repository |
git branch |
List all of the branches in your repository |
git checkout -b [branch-name] |
Create a new branch and switch to it |
git merge [branch-name] |
Merge a branch into the active branch |
git remote add [remote-name] [url] |
Add a remote repository |
git remote -v |
List all remote repositories |
Action | Windows (Command Prompt) | macOS (Terminal) |
---|---|---|
List contents | dir |
ls |
Change directory | cd [directory-name] |
cd [directory-name] |
Create directory | md [directory-name] |
mkdir [directory-name] |
Remove directory | rd [directory-name] |
rmdir [directory-name] |
Copy file | copy [source] [destination] |
cp [source] [destination] |
Move file | move [source] [destination] |
mv [source] [destination] |
Delete file | del [file-name] |
rm [file-name] |
Clear screen | cls |
clear |
Display text | echo [text] |
echo [text] |
Exit | exit |
exit |