Skip to content

Instantly share code, notes, and snippets.

View shivam043's full-sized avatar
🎯
Focusing

shivam singh shivam043

🎯
Focusing
View GitHub Profile
@shivam043
shivam043 / iterm2.md
Created May 28, 2021 12:52 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab ⌘ + T
Close Tab or Window ⌘ + W (same as many mac apps)
Go to Tab ⌘ + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction ⌘ + Option + Arrow Key
Cycle iTerm Windows ⌘ + backtick (true of all mac apps and works with desktops/mission control)
@shivam043
shivam043 / git_empty_branch
Created November 19, 2018 14:35 — forked from shiv043/git_empty_branch
Create new branch with empty folder structure
You can create a new empty branch like this:
$ git checkout --orphan NEWBRANCH
--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.
The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch.
Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory: