]> rtime.felk.cvut.cz Git - hubacji1/oneflow.git/commitdiff
Add Git Cheat sheet
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Thu, 28 Jun 2018 05:46:59 +0000 (07:46 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Thu, 28 Jun 2018 05:46:59 +0000 (07:46 +0200)
README.md

index da1400b1c055928579b2e82c43a90b2c1cf78bb0..9adb7a909e2a51da5b40f03f3d786488cfd1e3d9 100644 (file)
--- a/README.md
+++ b/README.md
@@ -50,4 +50,35 @@ mind [1][]:
 - Wrap the body at 72 characters.
 - Use the body to explain what and why vs. how.
 
+# Cheat sheet
+Use `git COMMAND --help` for showing the help!
+
+## Init
+- `git clone URL`
+- `git init`
+- `git config user.name "Your Name"`
+- `git config user.email you@example.com`
+- `git config --global user.name "Your Name"`
+- `git config --global user.email you@example.com`
+
+## Explore
+- `git log`
+- `git log --graph`
+- `git log --oneline`
+- `git log --branches`
+- `git log --decorate`
+- `git show COMMIT`
+
+## Changes
+- `git diff`
+- `git diff --cached`
+
+## Commit
+- `git add FILE`
+- `git add -p FILE`
+- `git reset FILE`
+- `git reset -p FILE`
+- `git commit -m'COMMIT MSG'`
+- `git commit`
+
 [1]: https://chris.beams.io/posts/git-commit/