- Knowing keyboard shortcuts and terminalogy can be extremely helpful. It can greatly speed up the development process. Knowing the lingo is helpful too. If you sound like a developer, you probably are a developer :-).
- Operating System (OS)
- Graphical User Interface (GUI)
- Command Line Interface (CLI) = Terminal = Shell
- Folder = directory
pwd
- print working directorycd ..
- go to parent directory (aka up)cd [folder]
- go into folder~
- your home folderls
- list files and subfolders in current foldertouch [filename]
- create a new filemkdir [directory name]
- make a new directoryrm [filename]
- remove (delete) a filerm -r [directory name]
- remove (recursively) a folder, all files, subfolder, subfiles, etc. Will prompt if trying to remove special files.mv [filename] [foldername]
- move a file to a different foldermv [filename] [new filename]
- rename a fileatom [filename]
- open the atom editoratom .
- Opens atom editor at place of pathctrl
+a
- go to the beginning of Linectrl
+e
- go to the end of Linectrl
+k
- delete to end of linectrl
+u
- delete to front of linectrl
+w
- cut to previous wordctrl
+y
- paste terminal buffernpm list -g --depth 0
- To see which packages are installed globally
cmd
+ LArrow
: Go to beginning of a line
cmd
+ RArrow
: Go to end of a line
cmd
+ /
: Toggle line/selection comment
cmd
+ f
: Search within file
cmd
+ shift
+ f
: Search within project
ctrl
+ k
: Delete everything after the cursor on the same line
ctrl
+ shift
+ k
: Delete current line
cmd
+ ctrl
+ UArrow/DArrow
: Move current line up/down
cmd
+ d
: Select current word (repeat to select multiples of the same word)
cmd
+ click
: Place multiple cursors
cmd
+ shift
+ d
: Duplicate a line
cmd
+ t
: Search for file by name within project
ctrl
+ g
: Go to line number
cmd
+ \
: Toggle tree-view sidebar
cmd
+ enter
: Add newline after current line
cmd
+ shift
+ enter
: Add newline above current line
cmd
+ g
: Find next
cmd + ]
: Indent selection
cmd + [
: Un-indent selection
cmd
+ shift
+ p
: Find and run available commands
ctrl
+ 0
: Switch between tree view and text editor
git help
- For help and documentationwhich git
- Check for git.git init
- Initialize empty git repogit clone <url>
- Clone and existing Repositorygit status
- check for changes in your working directorygit diff
- Changes to tracked filesgit add .
- Add all current chnages to next commitgit add -p <file>
- Add some changes in to next commit.git commit -a
- Commit all local changes in tracked files.git commit -m
- make a commit with a messge.git log
- Show all commitsgit log -p <file>
- show changes over time for specific filegit branch -av
- List all existing branchesgit checkout <branch>
- Switch HEAD branchgit branch <new-branch>
- Create a new branch based on your current HEADgit branch -d <branch>
- delete a local branchgit remote -v
- List all currently configured remotes.git remote add <shortname> <url>
- Add a new remote repository.git pull <remote> <branch>
- Download changes and directly merge / integrate into HEAD.git push <remote> <branch>
- Publish local changes on remote.git merge <branch>
- Merge into current HEAD.git reset --hard HEAD
- Discard all local changes in your working directory.git checkout HEAD <file>
- Discard local changes in specific file.git revert <commit>
- Revert a commit.git reset --hard <commit>
- Reset your HEAD pointer to a previous commit ... and discard all changes since then.
-
Use tab to autocomplete. for example, if the current folder has subfolders titled
games
,photos
andphotography
, typingpho
and pressing the tab key will result in displayingphoto
andphotography
. If we then type the letterg
to getphotog
,and press the tab key - the command will be autocomplete tophotography
. -
You can also use the up and down keys to step through the commands typed before.