Is it possible to have a local file different from its remote counterpart on Github?

advertisements

I was wondering if it is possible to have a file on your local machine that is different from the remote version of the file.

For example, if I wanted a config file locally to have actual server and port settings, but I wanted the version of the file on Github to have "default" settings, and for any new changes to the config file to be ignored.

Does anyone know if this is possible?


You can use --assume-unchanged

git update-index --assume-unchanged [filepath]

Git will ignore any further changes to this file.