I had been coding on my project for hours, and it was starting to get late in the day. I decided it was time to finally come out of my office at home, and focus on other (non coding) things before the night was over. As my wife and I were getting ready for bed, the power randomly went out. When I say "randomly" there were no storms, no wind, just a completely random power outage. Thankfully, our power disruption was short lived, and we had our power back in less than 5 minutes.
I began to think about my project I had coding on my desktop, which of course lost power. I remembered committing my code and pushing to GitHub before leaving my office, which was a relief to know that all of my work no matter what, was safe.
I don’t code full time, as I’m sure many of you may not either. I’m not a part of a professional work project or team. So if I don’t use a remote repository or any form of version control on my projects, it doesn’t affect anyone else. When I first started to develop, I almost never used git or GitHub, unless I wanted to test with a site live.
But guess what? This was a bad coding habit. I found myself coming back to projects I had worked on months prior that I had not used git, wondering where I had left off, or trying find my project in another directory location.
It’s easy I think for beginners to think of git as just a team tool.
The importance of git, and a remote repository can’t be stressed enough. Not only can local files be lost on a project, but also version control, collaboration and even personal motivation.
What if you want to come back to a project later, or share with a developer friend, or even roll back to a previous code base you had?
I think the importance of git isn’t only for teams and developers that do this for a living, but also developers that do this in their spare time.
One thing I love about GitHub is the contribution section in your profile overview. It shows all of your activity in your projects separated by day. This is a great way to see your progress, and to see days where you have accomplished a lot.
I use GitHub as motivation to keep learning. I try to make at least a commit (and push) a day. Even if it’s Sunday at 9pm it’s just cleaning up a readme, it has to be something. It forces me daily to think about what I am going to work on, and gets me in front of code daily. This has helped me also in sticking to a development schedule.
When we make a habit of coding, it helps us who are self-taught to keep learning and continually get better.