Don't. Just don't .
You could be easily DDOS'd and there are other security issues (especially if you have windows server :p ) that you can't handle.
Ask me,buy a cheap , probably used build for a small home server disconnected from the internet if you want to , use a premium web hosting service for you source etc.
You can always look into network attached servers also, they are actually pretty cheap now days and their power usage is very low. I have one myself and am very happy with it, I mainly use it like you are planning to (Storage for my projects with git and also for storing my media).
Depending on what you need the good brands range from $150 (Without HHD's) to around $350. Definitely worth checking out at least.
my 2 cents, no need to buy windows server. Linux would do fine for a headless server, plus it would definitely help with the price. If experience with linux is your problem, then there's tons of tutorials on anything to everything, especially on servers, out there.