showing more context in git add

For example, with git-diff I can do the following to show 10 surrounding lines of context when showing the diff.

git diff -U10

Can I do something similar with git-add --patch? Ideally I would like to to:

git add -p -U10

But I didn't find such option. Is there anything like this?


You can try:

git -c diff.context=10 add -p

If this works, you can make it permanent by using:

git config --global diff.context 10

This is the only thing I can find that might work.

Need Your Help

Android Image gallery and Fragment issue

java android android-fragments android-gridview

I'm trying to implement this gallery in my app using fragment.

Error with linker for a extern variable declared in a header file

c linker-errors

I have a header file a.h which is included in 2 .c files a.c and b.c