File tree Expand file tree Collapse file tree 1 file changed +1
-29
lines changed Expand file tree Collapse file tree 1 file changed +1
-29
lines changed Original file line number Diff line number Diff line change 11# Git Commands
22
3- Always use ` --no-abbrev-commit ` and proper formatting flags for all git terminal commands to avoid shell parsing issues.
4-
5- ## Specific Commands to Use:
6-
7- ** Instead of:**
8- ``` bash
9- git log --oneline
10- git show --stat HEAD
11- git branch -v
12- ```
13-
14- ** Use:**
15- ``` bash
16- git log --pretty=format:" %h %s" --no-abbrev-commit
17- git show --stat --no-abbrev-commit HEAD
18- git branch --show-current
19- ```
20-
21- ## Key Flags:
22- - ` --no-abbrev-commit ` - Prevents abbreviated commit hashes
23- - ` --pretty=format:"..." ` - Use explicit formatting
24- - ` --porcelain ` - For cleaner output when available
25- - ` --no-color ` - Remove ANSI color codes
26- - ` --show-current ` - For branch operations
27-
28- ## Common Patterns:
29- - ` git log master..HEAD ` → ` git log --pretty=format:"%h %s" --no-abbrev-commit master..HEAD `
30- - ` git status ` → ` git status --porcelain `
31- - ` git diff --name-only master ` → ` git diff --name-only master `
3+ ALWAYS USE ` git --no-pager ` to avoid shell parsing issues.
You can’t perform that action at this time.
0 commit comments