Comments (8)
The point is that typically when stowing from a package which is a git repo, the .gitignore at the top of that repo is intended only for use within the git repo, and should not be stowed into ~
or /usr/local
or wherever the stow target directory is. The only exception is when you want to use Stow to manage ~/.gitignore
(say) as a symlink pointing to a file version-controlled with git. In that case, you can set up a .stow-local-ignore
just for that git repo which overrides Stow's default ignore list and allows the .gitignore
to be stowed. In fact I do exactly that myself: https://github.com/aspiers/git-config/blob/master/.stow-local-ignore
Hope that makes sense, and sorry for the slow reply! Closing for now, but happy to reopen if anything is unclear.
from stow.
quoting the first post :
just add --dotfiles in .stowrc , and rename files to dot-gitconfig and dot-gitignore, so as I said this isn't really an issue.
that's how I solved it
from stow.
@afrid18 @nineboxes Just create an empty .stow-local-ignore
in ~/.dotfiles/git
. The point is not to override your global ignore file, but to override Stow's internal default ignore file.
from stow.
and sorry for the slow reply!
Haha no worries I've seen / done worse.
Thanks for the alternate solution, I wasn't aware of .stow-local-ignore.
I still think it's an interesting edge case / typical scenario; next time someone asks it may need to be added to the FAQ !
from stow.
@fenugrec commented on April 5, 2021 1:09 AM:
and sorry for the slow reply!
Haha no worries I've seen / done worse.
😆 Thanks for your patience!
Thanks for the alternate solution, I wasn't aware of .stow-local-ignore.
I still think it's an interesting edge case / typical scenario; next time someone asks it may need to be added to the FAQ !
Yep, fair point. We don't actually have a FAQ yet, but there is a section on Ignore Lists in the manual. If you have any ideas for how to improve that, I'd be happy to hear them!
from stow.
Hmm.. I must not be as savvy as OP, but can't seem to understand the issue. I wonder if I am doing something wrong?
I put my .gitconfig
and .gitignore
in ~/.dotfiles/git
which is vc'd using a normal git repo that makes ~/
as my work-tree (have an alias, similar to the "bare" concept, just not a bare repo basically). This seems to work fine. I think because I set my work-tree to $HOME. So it pulls the gitignore from home. Not my dotfiles. Does that make sense?
from stow.
I don't have .gitignore file in the .stow-global-ignore and yet I am unable to stow it.
Here is my verbose output:
dotfiles/git/.stow-local-ignore didn't exist
/Users/imamkhaja/.stow-global-ignore didn't exist
Using built-in ignore list
Ignore list regexp for paths: /(?^:(^|/)(^/\.stow\-local\-ignore$|^/COPYING|^/LICENSE.*|^/README.*)(/|$))/
Ignore list regexp for segments: /(?^:^(\.git|.+~|_darcs|.+,v|RCS|\.gitignore|#.*#|CVS|\.cvsignore|\.svn|\.#.+|\.hg)$)/
Ignoring path segment .gitignore
It seems that segments ignore list is the reason, that .gitignore isn't stowing, if I am not worng.
from stow.
Hello there. I also can't stow the .gitignore
by eliminating it from the .stow-local-ignore
file on the macOS.
@aspiers sorry for bothering you, could you please take a look?
from stow.
Related Issues (20)
- How to know that `stow` skip pointing symlink to destination since it already exists?
- make it possible to stow to a "flattened" file hierarchy (containing symlinks) HOT 2
- What changes cwd to the target directory during init of Stow? HOT 4
- Stow a absolute symlink HOT 3
- Dotfiles doesn't work with adopt
- --dotfiles missing from usage()
- [[email protected]] An error is reported during the execution of self-test cases. HOT 3
- `stow --simulate` should show `--adopt` actions HOT 2
- `stow --simulate` should warn when `-v` is not specified HOT 6
- Can GNU Stow use a stow target directory that is a symbolic link? HOT 2
- Investigate ditching Stow's pre-processing phase of installation HOT 1
- ~/.stow-global-ignore doesn't work HOT 15
- .stow-local-ignore: stow does not ignore file when parent directory does not exist
- Why was the no-folding-per-pkg branch abandoned?
- Failed to install because ls HOT 1
- make install fails | installation in docker container HOT 2
- Request build flag to turn off docs creation HOT 2
- Docs build error HOT 1
- --override not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stow.