R
R
ragnar_ok2020-06-11 22:53:08
git
ragnar_ok, 2020-06-11 22:53:08

How to resolve a conflict within a repository between UNIX-like symlinks and Windows?

The repository stores UNIX-like symbolic links. Most users of the repository use Linux for development, so it doesn't bother them.

I am a user of this repository and at the same time a user of MS Windows 10. I need symlinks inside the repository, but, of course, not UNIX-like, but mklink.

You have to overwrite UNIX-like symlinks and then use mklink to create a symlink for Windows, since they have the same name. That is, UNIX-like symlinks are always "changed" for the repository. You have to commit without them.

Please suggest a solution to get rid of permanently "changed" (Changes to be committed) UNIX-like symbolic links.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2020-06-11
@ragnar_ok

  • Create .gitignore_global in user folder
  • In it, list "unwanted relatives" and / or your links
  • Add this file to the global git config

windows cmd:
git config --global core.excludesfile "%USERPROFILE%\.gitignore_globbal"

Windows PowerShell:
git config --global core.excludesfile "$Env:USERPROFILE\.gitignore_globbal "

For Linux readers:
git config --global core.excludesfile '~/.gitignore'

I use this method all the time in order to get my own files in the project (configs, for example, Makefile, etc.) or even redefine the tracked files so that it would be desirable only for me and git so that it would not "get in the way".
PS: In general, you have
some kind of Linux subsystem appeared there!?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question