Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
tomdeakin
on March 15, 2012
|
parent
|
context
|
favorite
| on:
My Git Habits
git-add -p is new to me, but looks like something I'd wish I'd known about for a long while. The number of times I end up copying changes (like a new function) into some temp file while I commit is more than I'd care to admit.
telemachos
on March 15, 2012
|
next
[–]
Another good post that talks about
git add -p
is Ryan Tomayko's The Thing About Git[1].
[1]:
http://tomayko.com/writings/the-thing-about-git
pja
on March 15, 2012
|
prev
|
next
[–]
You can also git-add -i to go through the staging area & stage/unstage individual patches.
jedbrown
on March 15, 2012
|
parent
|
next
[–]
Or use git citool or an emacs mode like egg or magit (other editors have similar) that let you conveniently stage by hunk or line.
baq
on March 15, 2012
|
prev
|
next
[–]
you can use git gui (included) for a mouse-friendly way of doing this.
Kiro
on March 15, 2012
|
parent
|
next
[–]
Since I first tried the Git GUI I can't see myself using Git Bash ever again (and this article reminds me of why).
raju
on March 15, 2012
|
prev
[–]
If you are on a mac, Gitx works nicely too. You can see each file, and state "hunks" as you go.
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: