usr-local-ΕΨΗΕΛΩΝ
usr-local-ΕΨΗΕΛΩΝ

Reputation: 26874

Colon in a git file name. Windows developers alarm?

Yesterday a coworker running Linux on his laptop pushed to our master a set of files with a colon : in their names.

This is a legal file name in Unix world, but others running Windows could not pull anymore. Eclipse cancels the pull as the file name is valid. Git from console pulls the repository but does not allocate those files because of their illegal file name, so I end up with a working copy with missing files.

Before answering "switch to Linux" or "Linux is better than..." please understand that this is indeed an error as our software is normally deployed to both Windows and Linux servers, so including an illegally named file in a war package will result in a crash.

Here are my questions:

Yes, I understand it was a mistake to let him push directly to master, as we could easily isolate and obliterate che change if it was in a branch.

Since we have a bunch of active branches that are behind the master and need to be merge-aligned before PR, and need to be merged, I am wondering if it could be a good idea to rebase the master onto itself, force push and let all developers learn their lessons.

As final note, we use Bitbucket Server running on a Linux host and can perform merging using pull requests

Upvotes: 4

Views: 1958

Answers (1)

You could install some git hooks (doing appropriate checks), notably a git precommit hook (at least for Linux users), or a prepush hook.

Of course, that requires some cooperation (and convincing people to use it).

Upvotes: 2

Related Questions