1

I have modified my local .git/config file to allow only fast-forward merges on master branch:

[branch "master"]
    remote = origin
    merge = refs/heads/master
    mergeOptions = --ff-only

However I can't share this file with other repositories by pushing it on the remote server since it is not versioned.

How can I enforce all workstations sharing the same repository to use this option as well?

Kimo
  • 339
  • 1
  • 4
  • 13
  • Does this answer your question? [Storing git config as part of the repository](https://stackoverflow.com/questions/18329621/storing-git-config-as-part-of-the-repository) – GoodDeeds Jan 31 '20 at 13:12

1 Answers1

1

Not sure if there is a way to enforce that.

Although, you could use Conditional Includes on your home .gitconfig to use specific configurations for specific paths.

Gonzalo Matheu
  • 8,984
  • 5
  • 35
  • 58