By Maxwell Haron,
Moringa School Student
“Git,an essential tool for the modern developer,” they say. Personally,I consider Git to be more of a friend than a tool in software development. My ‘Best Friend’ has bailed me out in situations whereby I would have been required to start doing hours code from scratch. And so without beating around the bush here are my reasons why you should be using Git and not any other tool in software development.
1.Git is perfect to work with others
Git is designed to creating projects where many people can contribute to develop develop software in parallel. Specifically, it has a very powerful way to resolve conflicts when two people are working on the same file. Its stability is much higher than Subversion (SVN). Those who have used SVN knows what I’m talking about.Right??sl
2.It is easy to revert your code
Every time you send code to the server you make a commit. Every commit is referenced with a 40 character hash containing numbers and letters that uniquely identifies it. With git, it is super easy to revert to any past commit and fix a mistake.
3.Git has good documentation and tutorials to follow
Git has been around for many years now and it’s really easy to find good documentation that explain the basics of git and and add very useful commands that can help you get out of sticky situations .
4.Git is the current de facto open-source umbrella
Open source is where the copyright holder grants users the right to study, change, and distribute the software to anyone and for any purpose.If you want to develop open-source code, the biggest repository is GitHub.Here you can find the most popular repositories and also the most trending which include Bootstrap ,react ,d3 , tensorflow, angular, etc.
5.You can work offline
A lot of companies underestimate the benefits that can be had if their developers were to be able to work offline.
Being able to code on your laptop without having to connect to your company’s servers is not only about being able to work during a commute or while at home (which a lot of companies don’t permit due to security restrictions).
More importantly, being able to work offline makes you more fail-safe as a team: While with a VCS like Subversion or CVS, a developer can’t continue their work when a central server goes down, this is not an issue with Git.
In Git, developers can perform everything on their personal computer, making them independent of possible infrastructure downtimes.
6.Git Allows You to Undo Your Mistakes
In Git, you can almost everything,and I mean EVERYTHING
Being able to undo things gives your team the courage to try out ideas and concepts without the risk of breaking stuff, which in turn fosters a culture of innovation. Great Hits like ‘Git reset –hard + (the 40 character hash )’ helps a great deal when it comes to reverting to a specific commit
7.Git Makes Your Progress Clear
A commit in Git refers to the act of recording changes you have made in your source code.
When used properly, Git makes it easy to craft very granular commits. You can see what changes have occurred down to the microscopic level: Git will tell you what characters and lines in your source code have been altered. If you want to compare two versions of a file or the difference between two of your commits, you can issue Git’s diff command, which will highlight the differences between them.
8.Git Encourages Modularization
In even the smallest development projects, developers are often required to work on multiple components in parallel. Feature X, bug #102, a new UI for a sign-up form, etc.
Among many others, here are a couple of major issues with projects that aren’t version-controlled:
- Project dependencies will be painful to manage. Team members must sort out which changes affect which components.
- Unfinished and experimental code will mix-in with production-ready code.Without version control, there is a huge chance that an unstable piece of code gets deployed to a production environment.
Imagine these scenarios.
Your client tells you that they don’t want feature X anymore.
Or what if you find that feature Y — an experimental feature you have been working on — can’t be implemented?
How do you get code removed safely from your code base?
Using branches is the solution to these commonplace development problems. Although Git wasn’t the version control system (VCS) that introduced the concept of branching, it’s the first of its kind that makes it user-friendly.
9.Git is easy to use
Nobody can say git is difficult. To do the day-to-day work, you just need to manage these 8 commands: git clone, git status, git add, git commit, git push, git pull, git checkout and git branch.With them you can download a repo, check its status, add files, send files to the server, retrieve the latest changes on the server and create branches to work in parallel.
10.Git Branches allow for simultaneous code versions
Branches are one of the best features of a version control software and are used to develop in parallel to the main repository. A branch is a fork of the main code to develop a new feature. When you create a new functionality in the code, you should create a branch. Then you develop the functionality, test it and when it works perfectly, you can integrate it or merge into the main branch (which is usually the master branch). When using branches, you can have simultaneous versions of the same code.
11.Never Lose Data Ever Again
Losing data and not being able to recover it can break a dev project.
We’ve all heard or experienced our own set of horror stories about failed backups and servers. It’s good to know that when using Git, every developer working on a project has a full-fledged copy on their machine, including the project’s complete change history.
And if your team uses a remote source code repository such as GitHub, then the chances of losing your work in the event that your on-site backups fail is much smaller.
If your backups break down, losing data isn’t even a possibility when using Git: Just take any team member’s local repository and restore in minutes.
There you go,my eleven reasons why I love git .Git has stepped out of being a technology for early-adopters. Today, more and more developers are using it to improve the quality of their code and workflow.
If you would like to get started with Git right now, read these resources: