سؤال

How could I create a git patch from thousands of changed files but only include specific file types. For example I only need .cp and .js file types that are changed within my repository to be included in the patch.

هل كانت مفيدة؟

المحلول

It's so simple. If you want to include only specific file types in your patch, you could do so by following the below syntax:

> git diff  0fa393b64893 940dd1e792b -- '*.cp' '*.js' > my.patch
> git apply my.patch

You need to navigate to your repository directory in your bash.

> cd /c/projects/myproject/
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top