How to cherry-pick changes from one file to another file?

Not exactly cherry-pick, but you might want to use:

git checkout <branch or sha of commit> -- filename

This checkouts the file by its version in another branch; it is the easiest possible solution, if it satisfy your needs (i.e., if you don't need to actually merge changes to the file from two separate branches)

The other possibility is to generate diff (you can generate diff from a range of commits just and limit it to one file) and then apply the diff. Check out: How to diff the same file between two different commits on the same branch?


Basically you need to make a diff on the vvn.c changes and apply them to a aqu.c. See e.g. here: How to apply a Git patch to a file with a different name and path?

However, this is quite tricky thing. Why do you have different file names which anyhow similar so that you should make same changes?

Probably it is better to come up with some another approach. E.g. for a C you could use #include and extract common part into a separate file.