Please enable JavaScript.
Coggle requires JavaScript to display documents.
Pro Git (Git Commands (git config --list
git help config, git status -uno…
Pro Git
Git Commands
-
git status -uno # ignore untracked files
git status -suno # simple output
In "MM" flag the first 'M' means "modified and staged", the second 'M' means "modified but not staged"
-
-
git diff # find changes in unstated files, i.e. working vs. stage
git diff --staged # stage vs. repo
git commit -v # show diff in commit editor
git commit -m "commit message"
git commit -a # skip staging
git rm <file>
# remove the file from git but keep it in working directory (as untracked)
git rm --cached <file>
-
Design of Git
-
-
-
-
Mostly "add" data, and most operations are undoable
3 States: Committed, Modified, Staged
- The same file could have different content in working directory and stage area
- Commit operation puts "all" contents in stage area into repo
-