Often I change code but I don't know if I might need the old one, I can leave it under comment but then I find myself with lots of green lines while I hardly can read the real code. Thanks.
You might use the following options:
If you make a change in your source code, you can first comment out the old part and add
//TODO: your description
After some testing you can then search in your code for "//TODO:" and clean it up.
Version control system (e.g. git)
Additionally you should use a Version control system, e.g. git. this gives you the possibility to roll back to any version you want and to add a comment to your changes when you push them.
If you decide that you don't need a software project anymore (e.g. because you don't have enough time or your priorities have changed), you should create an archive-folder where you move your old projects to.