These are not the best practices.
These are only practices that have worked for me.
Your mileage may vary.
Two schools of thought:
Cloning creates a *copy* of the code onto the hard drive of the programmer. Similarly "git push" *copies* code from the hard drive to the online repository.
Two programmers can work on the same code at the same time on different clones. (This is good.)
Before making any changes to the code, branch the code. This way, you can make changes in isolation, test, and only when you are done, make a pull request to merge your changes into the main branch.
Most branches that you make will eventually be deleted, as you work on different possible solutions to the code. You may need to create a new branch to work on a different part of the problem, or when one method of solving the problem seems "stuck" and you want to try another way of approaching it. This is OK.
Your code isn't complete - and no pull request should ever be accepted, without adequate test coverage.
Not even during crunch time. If you don't have time to write the code and the tests - downscope till you do.
Software quality is inflexible and cannot be compromised on.
If you *can* write the tests before you write the code, do it. But sometimes that's not possible (or far more difficult than it's worth.) Instead, test-while-driven - if you add a new bit of code, make sure you write the test while it's still fresh in memory. That'll be fine.
Git-based tools, such as Travis-CI, rely on full test coverage to reduce bugs.
If your pull request cannot be automatically merged, go back and rebase your code again. Pull requests with merge conflicts should be automatically denied.
Get your code reviewed. You can't catch the bugs you've made - if you could, you wouldn't have made them.
For this reason, no one who makes the pull request can approve the pull request.
Code reviews may seem painful, but often they can point out a more efficient way to do something, and they can help both the reviewer and the reviewee learn from each other's code, making them better programmers.
You may wish to refactor based on feedback from the code review, even after the pull request is accepted. Keep those notes handy!