Make the action only commit new, untracked files #338
-
I'm trying to use this action to only commit untracked files, rather than also modifications to existing ones. |
Beta Was this translation helpful? Give feedback.
Answered by
stefanzweifel
Aug 8, 2024
Replies: 1 comment 1 reply
-
This isn't easily doable with git-auto-commit as - as far as I know – there is no option/flag for this built in into What you could do is run the following script in your action instead of using git-auto-commit. git ls-files --others --exclude-standard | xargs git add
git commit -m "Add untracked files"
git push origin You would have to add any missing git-commands yourself. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jj-lucas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This isn't easily doable with git-auto-commit as - as far as I know – there is no option/flag for this built in into
git-status
,git-add
orgit-commit
.What you could do is run the following script in your action instead of using git-auto-commit.
You would have to add any missing git-commands yourself.