My first real project crashed and I had to start over from scratch
I spent all week building a simple weather app in Python, but yesterday I tried to add a new feature and the whole thing just stopped working. I didn't use version control, so I had to delete everything and begin again from my old notes. How do you guys keep your code from breaking when you try to add new stuff?
Totally agree about branching for every idea. It feels like a safety net, so you can try wild stuff without fear. Naming branches clearly helps too, like "add-photo-filter" instead of just "new-stuff". That way you remember what each experiment was for later.
Oh man, "stopped working" is the worst feeling. I did the exact same thing with a little script that sorted my photos. Added a filter and suddenly nothing ran at all. Like @thomas.tyler said, git is a lifesaver. Now I make a branch for every new idea, even the dumb ones. If it breaks, I just toss that branch out and my main code is still safe. It feels like having a time machine for your project.