-
|
I'm curious to learn small commands, shortcuts, or habits that made your daily Git workflow faster or cleaner. Examples could be around branching, stashing, diffs, conflict resolution, or anything you think more people should know. Looking forward to learning ! |
Beta Was this translation helpful? Give feedback.
Answered by
Nixxx19
Dec 6, 2025
Replies: 1 comment
-
|
Hey! @A-Akhil One tip that really improved my workflow is using git add -p
Git will show each change and let you choose:
1. y to stage it
2. n to skip it
3. e to edit the hunk
4. s to split it
It’s great for keeping commits clean and focused.
Another helpful workflow improvement is:
git switch -c <branch-name>
This creates and switches to a new branch in a single command, making it clearer and less error-prone than using checkout.
Both of these have helped me maintain a cleaner commit history and avoid mixing unrelated changes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey! @A-Akhil
One tip that really improved my workflow is using
git add -pfor selective staging.Instead of committing an entire file, you can interactively choose which hunks to stage: