0

I'm here with a problem that I can not solve! I am using the Yii2 Advanced framework and create a symbolic link for a folder, inside that folder I have two files and one of them is a gitignore file. Here is my working tree:

backend web uploads <- symbolic link frontend web uploads <- original folder index.php .gitignore

When I try to stash from my working tree git returns the following: error: 'backend / web / uploads / .gitignore' is beyond a symbolic link fatal: Unable to process path backend / web / uploads / .gitignore Can not save the current worktree state

  • 1
    have a look at this [question](https://stackoverflow.com/questions/954560/how-does-git-handle-symbolic-links), you can track a symlink by itself, but content behind it. you can however move the ignore file outside the folder and have your uploads folder ignored completely – csminb Nov 10 '17 at 16:56
  • 1
    a better solution actually is to leave the original as is, and completely ignore the symlink (add `/backend/web/uploads` to your root .gitignore file) – csminb Nov 10 '17 at 17:03

0 Answers0