Yesterday, a colleague under Linux on his laptop moved a set of files with a colon in their names to our wizard: .
This is a legal file name in the Unix world, but others running on Windows can no longer pull. Eclipse cancels the click when the file name is valid. Git pulls the repository from the console, but does not select these files because of their illegal file name, so I get a working copy with the missing files.
Before replying to “switching to Linux” or “Linux is better than ...”, please understand that this is really a mistake, as our software usually deploys to Windows and Linux servers, therefore including the illegally named file in the war the package will lead to failure.
Here are my questions:
- Is it possible to limit file naming in Git? For example, SVN warns the committer when two files coexist with a different body or the file is renamed to its body (for example, from
Myclass.csto Myclass.cs). I would like to use Windows-style names in files, since Windows is strictly more restrictive than Unix. I do not know about any legal file name that is illegal in the Unix world. - Is it possible to keep such a fixation in history? I successfully asked the committer to return its change, reset my working copy, so that a few changes before it was committed, and then pulled. However, no one using Windows will ever be able to pull out this revision (not a problem) or perhaps convert it interactively in a branch
Yes, I understand that it was a mistake to allow him to direct the owner directly, since we could easily isolate and destroy the change, if it was in a branch.
Since we have a bunch of active branches that are behind the wizard, and they need to be combined before PR, and they need to be combined, I wonder if it might be a good idea to reinstall the wizard on itself, make it click and let all the developers master their lessons.
Bitbucket Server, Linux, pull