I am trying to figure out what is the best workflow to use Git to synchronize a code base used by several developers concurrently. I have a script that was provided for me by my team leader, which adds pretty much all the code files I need to sync, leaving out batch files, compiled files, etc.
In general, what I believe I should do is sync before I start working on a problem, then sync when I am done testing. However, I am afraid this will implicate a long lapse between when I pulled the repo's code and when I publish mine. This means, for example, that I might use some functions which have been either broken or fixed without my knowledge or that I might break some code inadvertently during that lapse, which someone else was using. Also, I think publishing "unfinished" code might be a bad practice, but I'm not sure.
How can I manage my syncs so that I interfere as little as possible with others' code, and avoid a long turnaround time? Any recommendations are welcome.