gruntwork-io / git-xargs

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
https://blog.gruntwork.io/introducing-git-xargs-an-open-source-tool-to-update-multiple-github-repos-753f9f3675ec
Apache License 2.0
935 stars 62 forks source link

git-xargs not respecting .gitignore #53

Open quinnturner opened 2 years ago

quinnturner commented 2 years ago

git-xargs version What does git-xargs --version show?

git-xargs version v0.0.11

Describe the bug git-xargs is not respecting .gitignore

To Reproduce Steps to reproduce the behavior:

#!/usr/bin/env bash

git-xargs \
    --commit-message "Update Yarn Berry to latest canary" \
    --repos ../repos.txt \
    --branch-name chore/update-yarn-berry-canary \
    --loglevel debug \
    "$(pwd)/update-yarn-berry-canary.sh"
#!/usr/bin/env bash

# update-yarn-berry-canary.sh

yarn set version canary
yarn

That results in files being added to node_modules when, in my .gitignore in those projects, I have node_modules/ listed.

Expected behavior

Respect the .gitignore (in this case, node_modules/)

Screenshots If applicable, add screenshots to help explain your problem.

image

Additional context Add any other context about the problem here.

nwsparks commented 1 year ago

Running into this as well. What's weird is it's partially respecting it. In my case it's only adding one specific package, but the package is definitely covered by the gitignore.

tried on both v0.1.6 and v0.1.7

until this is fixed ending scripts with git clean -fxd or -fXd depending on the situation is probably best