How to prevent fork specific files being included in pull requests to original repo

21 Views Asked by At

I have made a fork of a repo on GitHub, and use this to make changes and submit them as pull requests to the original repo.

There are some files that I don't want to include in pull requests (nor do the maintainers of the original), but I still want them to be stored in my fork, as I develop across multiple machines and want to be able to manage them in github. For example my own configs in .devcontainer/ and .vscode/, or application config files specific to developing the fork.

Using .gitignore and other methods to ignore the file prevents them being stored in git at all.

Is there a feature in git/GitHub that facilitates this? If not, what is the best practice?

0

There are 0 best solutions below