Alternatively you can set up a linter that doesn’t let you push your code until it’s properly formatted and/or well-tested.
With regards to more higher level stuff such as setting and working towards goals, I find a “mastermind” group invaluable. It’s a group of like-minded insividuals who meet up regularly (offline or online) and discuss what they are working on. Having a structure in place to make sure everyone has to share their progress or lack thereof is key.
Shameless plug: I built WIP ( https://WIP.chat ) To solve this exact problem. It’s a community + group chat of makers where we actually share our todos and the progress we make. (this makes it very different from your typical group chat)
Of course you could also set up something similar yourself with a group of friends. A weekly Skype call with Google Doc. Etc. Whatever works best for you.
Edit: typos