Thats a pretty broad question. But here are some things you can do: Have a git repo that you both have access to. Work on separate branches and push to your master branch. PR your changes if you want to confirm with each other. Keep up with your communication, make sure you are both working on what you should be working on, to prevent overlap. Use a system like Trello to track progress, and also track things you want to work on.
If you are using Eclipse, there is a plugin named Saros that allows you to code on the same project in real time and see the changes in real time
I worked with a friend several years ago on a plug-in. I setup a private repository using Subversion. That worked really well.