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

zbg commit bad practice #19

Closed
V01D-NULL opened this issue Apr 12, 2023 · 2 comments
Closed

zbg commit bad practice #19

V01D-NULL opened this issue Apr 12, 2023 · 2 comments
Labels
question Further information is requested

Comments

@V01D-NULL
Copy link

zbg commit ran a git add ..

This isn't really considered good practice because there can be temp, test or unfinshed files that need to manually be unstaged which can be quite tedious.

Solution: Implement a separate zbg add <files> command, allowing the commit command to function as just that.

@chshersh chshersh added the question Further information is requested label Apr 14, 2023
@chshersh
Copy link
Owner

Thanks for your feedback!

As mentioned in the README, zbg is not a git replacement. I don't see what zbg add can add to git add (pun intended), so I don't see many benefits in having a separate command for this.

I do find myself occasionally in a need to add some files separately when I'm in the middle of a coding mess.
However, often I prefer to plan my work in advance. I also prefer investing in .gitignore (or .git/info/exclude if patching .gitignore is not possible), so committing accidental rubbish is not a problem.

I have big committing all the local changes for years and I haven't experienced any problems with that, so I don't see the need to change zbg commit at the moment.

@chshersh chshersh closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2023
@V01D-NULL
Copy link
Author

V01D-NULL commented Apr 17, 2023

Hi, thanks for the response!

often I prefer to plan my work in advance

You know how it is... debugger; and print statements in all files :D

It certainly isn't a problem of poor planning or not using a gitignore (which I am), I probably should've been more specific.

I used to git add . before that bit me a long time ago, ever since I've been git diff-ing my changes and stage them manually.

I don't think adding files not staged for a commit should be placed in the .gitignore (or temporary files for testing. I'd honestly forget about them and the file would grow a lot tbh), but each their own.

Who knows, I might fork it, speedrun learing ocaml and just implement that for myself. Love the looks of zbg🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants