SOFTWARE APPLICATION List of commands for some popular applications.
GIT Init local new repository Init repository with existing folder Init repository with existing repository Publish Pupular commands https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf
Command Description CONFIGURATION git config --global user.name "[name]" Sets the name you want atached to your commit transactions git config --global user.email "[email address]" Sets the email you want atached to your commit transactions REPOSITORY git init [project-name] Creates a new local repository with the specified name git clone [url] Downloads a project and its entire version history MAKE LOCAL CHANGES git status Lists all new or modified files to be commited git diff Shows file differences not yet staged git add [file] Snapshots the file in preparation for versioning git rm [file] Deletes the file from the working directory and stages the deletion git add -A Snapshots all files in preparation for versioning git commit -m "message" Records file snapshots permanently in version history git reset HEAD~ Remove last commit git add --all && git commit --quiet -m "message" One line to add and commit, silent output MAKE LOCAL GROUP CHANGES git branch Lists all local branches in the current repository git branch [branch-name] Creates a new branch git checkout [branch-name] Switches to the specified branch and updates the working directory git merge [branch-name] Combines the specified branch’s history into the current branch git branch -d [branch-name] Deletes the specified branch MAKE SERVER CHANGES git pull Downloads bookmark history and incorporates changes git reset --hard Remove local changes git push [alias] [branch] Uploads all local branch commits to GitHub or other git server git push origin master Upload to branch master
Log Commands git log --name-only For full path names of changed files git log --name-status For full path names and status of changed files: git log --stat For abbreviated pathnames and a diffstat of changed files: git log -n 4 Last 4 commits
VIM Basic Navigation Source: https://vim.rtorr.com/
Mode: n - normal, i - insert, v - visual Normal Mode / Navigation Current Line Command Info Description h,j,k,l move left,down,right,up w jump to the start of a word (exclude punctation) W jump to the start of a word (include punctation) e jump to the end of a word (exclude punctation) E jump to the end of a word (include punctation) b jump backwards to the start of a word B jump backwards to the start of a word (words can contain punctuation) % jump to the matching characters (),[],<>, 0 Start of the line ^ Start of the line without: whitespace $ End of the line g_ End of the line without wihtespace fu, fp Next character ‘u’,‘p’, etc… (only current line) fu ->; repeat search for ‘u’forward fu -> , repeat search for ‘u’backward ty Before next character ‘y’
Normal Mode/ Navigation Document Command Info Description gg First line of the document G Last line of the document 16G Go to line 16 } Next paragraph { Previous paragraph
Normal Mode / Navigation Screen Command Info Description H,M,L Move top screen (H) middle screen (M) bottom screen (L) zz Center line in the screen ctrl+e Move one line down ctrl+y Move one line up ctrl+b Page Up ctrl+f Page Down ctrl+u half page up ctrl+d half page down
Normal Mode / Insert Mode Command Info Description i Insert mode I Insert mode at the begining of the line A Insert mode at the end of the line o Add new line below, move and go to the insert mode O Add new line below, move and go to the insert mode ea Insert mode in after the current word
Normal Mode/ Editing Command Info Description r (e.g. ra) Replace single character R Replace mode J Join line below to the current one with one space in between gj Join line below to the current one cc, S Change entire line (move to the insert mode) cw Change word from cursor (move to the insert mode) ciw Change entire word (move to the insert mode) s delete character and substitue text (move to the insert mode) xp Transpose two letters. (replace them in order) > shift text right < shift text left
Normal Mode/ Undo-Redo Command Info Description u Undo Ctrl+r Redo . repeat last command
Normal Mode / Copy Command Info Description yy Copy a line 3yy Copy 3 lines yw Copy from the cursor to the end of the word
Normal Mode / Paste Command Info Description p Put from clipboard after the cursor P Put clipboard before the cursor
Normal Mode / Cut Command Info Description dd Cut the line (to the clipboard) 2dd Cut 2 lines dw Cut word from the cursor to the end diw Cut entire word diW Cut entire word include special characters D Cut to the end of the line x Cut single character 2x Cut two characters
Insert Mode Command Info Description Esc left_alt+command Exit insert mode, e.g. alt+o - exit and add new line, alt+j - exit and move down
Instructions Instruction Description :q Quit (error when not saved) :q! Quit without save :w Save changes :wq Quit and save :wqa Write (save) and quit on all tabs :set nu:set nonu Display lines / Hide lines
TMUX tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.
https://github.com/tmux/tmux
Start new no named session:
Commands/sessions
Shortcut/Command Info Description tmux ls session list tmux new -s name Create new session ctrl+b s List of sessiion and switch to selected session tmux kill-session -t name Kill session with the name name
Panes shortcuts Shortcut Info Description ctrl+b d Deattached ctrl+b % Vertical split ctrl+b “ Horizontal Split ctrl+b o Swap panels ctrl+b ↑ Move Up ctrl+b ↓ Move Down ctrl+b ← Move left ctrl+b q Show numbers ctrl+b x Kill current pane (also command exit) ctrl+b z Zoom ON/OFF ctrl+b t show clock (anykey close clock)
Tmux commands Shortcut/command Info Description ctrl+b : Go to command :resize-pane -L 10 Resize pane to left by 10 cells :resize-pane -R 10 Resize pane to right by 10 cells :resize-pane -D 10 Resize pane to down by 10 cells :resize-pane -U 10 Resize pane to up by 10 cells swap-pane -s 0 -t 1 swap panes
Windows shortcuts Shortcut Info Description ctrl+b c Create new window ctrl+b w list windows ctrl+b , name window ctrl+b & kill window ctrl+b n next window ctrl+b p previous window