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

Re-add the new files that have been commited #7

Open
addisoc opened this issue May 6, 2019 · 1 comment
Open

Re-add the new files that have been commited #7

addisoc opened this issue May 6, 2019 · 1 comment

Comments

@addisoc
Copy link

addisoc commented May 6, 2019

Not sure if this project is still being maintained, but for me I copied the script over to the pre-commit script and it works almost exactly as I need. The only problem is that after the formatting is done the new changes are not committed and need to added again so to remedy this I added this line to the very end of the file.
git add $changed_java_files

Now when the pre-commit script runs it auto-formats the code and then commits the changes in the same commit

@rjmunro
Copy link

rjmunro commented Jan 10, 2022

Please don't do this. I frequently stage only some of a file using git gui (or similar tools), leaving out lines that I have added just for testing and debugging, or that should be part of a separate commit. This change would cause my work to get seriously messed up.

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

2 participants