Github is a website that allows users to use it as a storage area for their projects. It is not just for storing files though. It is for something called version control. Version control allows people to keep track of their projects as they work on them. As well as the team they are working with. So if you are working alone or with a team github.com is a great place to track your projects during the development process. It is also a great place to host your portfolio giving people instant access to your code. You can check out my github.com account Here
Lately I have been interviewing at local companies in the DFW area. I spent time researching the companies and common interview question prior to walking into my interviews. Regardless of what I read and what I was asked in each interview one thing was always the same.
What do I use for version control? Do I know how to use git? Is my portfolio up to date and am I active on github? Do I use the command line when using git?
Although all of these questions are centralized around git, it reminded me the importance of keeping up to date with common technologies that are used in the workplace. There are many reasons a lot of us might have which exclude us for needing to use git, but the truth is our reasoning is wrong. Git is a fantastic tool, even when working alone on projects. I made a point to go home and include git into all of my projects this month so I could answer the question better in the future. Surely if I was already asked three times this month I will be asked again. I am happy to say that using git immediately increased my ability to work through projects more efficiently.
A Few Things I Noticed
I find that a few important git commands really changed my workflow the most. I am sure that the veterans out there use git in ways I have not even thought of, but for the noob this was how I used it. I used it to keep track of each part of my projects. This allowed me to roll back my projects a few times when things went wrong. Sometimes we make mistakes or implementing things later might not be as easy as earlier. Make frequent commits with your code. The more commits you make the more points of reference you have in your code. Create a new branch for each new task you work on. Then merge the branch back with your master when you are done. These are very common usages with git and it may be the bare minimum, but at least we can say we have experience using it.
Commands To Know
The commands I mostly use and I think everyone should know.
1. git pull – pull into your project for whatever branch you are currently on.
2. git add – This allows you to add current files to your git local repo.
3. git commit – commit your current changes and prepare it for a push.
4. git push – push your current commits to the github repo for the specific branch you are on.
5.git checkout – allows you to switch to a branch.
Although these may be basic commands, you should practice using them. Being able to track your projects, roll back to old versions when needed and organize your commits with new branches will surely benefit you in many ways. At the very least it will make the people you are interviewing for more confident in your coding habits.