DEV Community

loading...
Cover image for My Commitment to "Commit"

My Commitment to "Commit"

aswaff profile image Avery Swafford ・2 min read

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.

Git May Not Feel Necessary for Us That Don’t Code Full Time

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

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.

My personal commitment

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.

Discussion (6)

pic
Editor guide
Collapse
wick3drose profile image
wick3dr0se

Git is absolutely necessary for me. I use it for my dotfiles among many other things. I use Arch Linux and as an avid user, I tend to break my machine from time to time doing silly stuff. Everything I work on goes through git and I wouldn't be able to have free hosted websites without it likely. I use Gitlab personally. It has way more features and its completely open source. I dislike Microsoft even though Bill Gates sold it.

I actually dropped my laptop two days ago and somehow it forgot a bunch of stuff and wouldn't boot properly. The screen came out of it and the back panel was popped off. I put it back together, dusted it out, reinstalled Arch. Git pulled my dotfiles, configs and projects. Everything is perfectly back to how it was. I don't need an extra backup utility. Another cool feature people often don't seem to think about, is that you can upload pictures in folders and use it as a categorized album. I removed all my photos from Google tracking Drive software and now they aren't compressed upon upload either ❤

Collapse
aswaff profile image
Avery Swafford Author

I use git and a remote repository for everything I work on now. I also go between a laptop and desktop, so its really nice easily having my work on both!

Collapse
wick3drose profile image
wick3dr0se

Absolutely! It's great to see an informational post encouraging people to use Git. It's such an important tool and that's why I love making examples of everyday use cases Git can help with. It's not limited to developers. It can be used purely as a backup/pull system for private photos, documents or almost anything. What's not to love about Git? 😁

Collapse
jjokah profile image
John Johnson

I like the part about using GitHub as motivation. I think I will give that a try. 👍

Collapse
aswaff profile image
Avery Swafford Author

I'm currently on a 25 day contribution streak with GitHub, its a great motivator!

Collapse
vier31 profile image
Jan Schröder

Looking forward to the day when your bathroom wall is literally your GitHub history printed on a wallpaper.