Use git.
git - is a distributed version-control system for tracking changes in source code during software development.
You, or your friend, can make changes to the code, push them to the repository.
And when you use git pull. You will receive in your local copy the changes they made