Git Cheat Sheet

@hasanstack came up with a Git Cheat Sheet. I like the command flow overview. Git Cheat Sheet by @hasanstack: Download.

Remove git history

Make the current working directory into the only commit and remove the complete git history. Found on stackoverflow. git checkout --orphan newBranchgit add -A # …

Search help
foo*
Will match documents with words beginning with foo.
foo bar
Will match documents that contain foo or bar.
+foo bar -baz
Will match documents that must contain foo, might contain bar and must not contain baz.
foo~1
Will match boo, as it requires a single (~1) edit (replacing f with b), but boot would not as it also requires an additional t at the end.