Add chunk(s) of modified file to a commit interactively
Use git add -p *filename* or git add --patch *filename* to interactively pick which parts of modified file should be added to a commit.
The pick dialog looks like this:
@@ -24,7 +32,12 @@ module CoreMIDI
]
functions.each do |func|
- attach_function *func
+ begin
+ attach_function *func
+ rescue Exception => e
+ $stderr.puts "Couldn't attach function #{func.first}"
+ raise
+ end
end
def midi_read_proc()
Stage this hunk [y/n/a/d/K/j/J/e/?]?
more info: http://nuclearsquid.com/writings/git-add/
Written by Bartosz Filipowicz
Related protips
1 Response
Nice, but for such things I prefer gui.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#