Trying to split a hunk into smaller ones by git add -p and split option, but entire file appears as one hunk and I can\'t split it.
The reason it's not working is because your hunk is already as small as git will automatically get it. Split only works when there are non-changed lines separating changed lines close enough that git assumes they belong together.
In order to achieve what you want, you will need to manually edit the patch