psutils icon indicating copy to clipboard operation
psutils copied to clipboard

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

Open spookyuser opened this issue 6 years ago • 0 comments

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

spookyuser avatar Jul 04 '19 15:07 spookyuser