Thank you! And that is a great point - a lot of times I commit every time I have finished a solid (hopefully working) portion of the card. Basically if I'm going to step away for a break and would regret losing what I built, I commit. If what I commit isn't working, I make sure to specify what doesn't work and why.
I would urge against commiting incomplete code. It really is a matter of opinion and process but for my team of 12 working on a large project keeping our git history clean is really helpful.
Some more tips to consider:
If you need to port code to another machine to continue working you can create a patch file:
git diff > patchfile git apply patchfile
Or, if you do commit a temporary commit you could also squash the commits together using interactive rebase
git rebase -i HEAD~2
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you! And that is a great point - a lot of times I commit every time I have finished a solid (hopefully working) portion of the card. Basically if I'm going to step away for a break and would regret losing what I built, I commit. If what I commit isn't working, I make sure to specify what doesn't work and why.
I would urge against commiting incomplete code. It really is a matter of opinion and process but for my team of 12 working on a large project keeping our git history clean is really helpful.
Some more tips to consider:
If you need to port code to another machine to continue working you can create a patch file:
git diff > patchfile
git apply patchfile
Or, if you do commit a temporary commit you could also squash the commits together using interactive rebase
git rebase -i HEAD~2