git-xargs not respecting .gitignore

Open
#53 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
git, go
Domain
cli

Research direction

Start by reproducing the reported command with git-xargs v0.0.11 and a repository containing an ignored node_modules/ directory. Trace how the command stages generated changes and inspect the repository's .gitignore handling; done means ignored files are not added while other intended changes still are.

Written by the indexing model from the issue text.

Description

needs design

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.

Dominant language
Go
Stars
1.1k
Forks
75
Avg merge
22h 5m
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from gruntwork-io/git-xargs

All issues in gruntwork-io/git-xargs

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.