Skip to content

Commit 4e5afc0

Browse files
committed
chore(cursor): always use git --no-pager to avoid parsing issues
1 parent 4369cea commit 4e5afc0

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

.cursor/rules/git-commands.md

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,3 @@
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.

0 commit comments

Comments
 (0)