Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Stow not installing file

📅 2016-Feb-01 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ git, stow ⬩ 📚 Archive

Problem

I had a directory with a .gitignore file in it. When I run Stow with this directory as the input, symbolic links to all the files in the directory were created, except for the .gitignore file.

Solution

Stow ignores installing files and directories that are in its ignore list. The files and directories to be ignored can be specified as regular expressions in an ignore file. Stow looks for a ~/.stow-global-ignore file. If it does not find it, it will use an internal default ignore list.

The default ignore list from Stow source code is shown here:

# Comments and blank lines are allowed.

RCS
.+,v

CVS
\.\#.+       # CVS conflict files / emacs lock files
\.cvsignore

\.svn
_darcs
\.hg

\.git
\.gitignore

.+~          # emacs backup files
\#.*\#       # emacs autosave files

It can be seen that .gitignore is one of the files that it will ignore, hence it is not installed. To override the internal ignore list, create a ~/.stow-global-ignore file filled with the regex of what files to ignore. If you make this an empty file, Stow will install all files without ignoring any of them.

Reference: Stow manual

Tried with: Stow 2.2.0 and Ubuntu 14.04


© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email