Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitignore util does not seem to work when piping console output to a file #27

Open
spookyuser opened this issue Jul 4, 2019 · 0 comments

Comments

@spookyuser
Copy link

I'm not 100% sure if this is an issue with gitignore or my bad powershell skills, but I thought I would just add this here because maybe it's an easy fix.

When I tried using the gitignore util with the powershell command gitignore python >> .gitignore the command produced the full python gitignore template but the template didn't seem to be recognised by git. One of the excluded directories in the template is /build yet whenever I did a git add . on a fresh repository the /build directory was always included.

However, if I copied the template from gitignore.io to a new .gitignore file then there was no issue and the build folder wasn't staged. So I wonder if this is a text encoding issue, because when I copy and pasted the .gitignore file works but when piped it doesn't. I also noticed that the command line tool on gitignore.io adds -Encoding ascii to their command

Here are the .gitignore files that I generated.
not_working.txt
working.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant