Gitting Started With Git
Everything you need to know about Git.
Join the DZone community and get the full member experience.Join For Free
In this edition of "Best of DZone," we take a look at all things Git, from basic commands, to theory behind its functionality, to development and deployment patterns. All tutorials and articles featured below are from our wonderful community members who continue to power DZone by sharing their knowledge of and passion for development with readers like you.
Without further ado, let's git started!
What Is Git
Developed by Linus Torvalds in response to BitMover's pricing change of BitKeeper, Git has quickly become the tool of choice for developers seeking to create projects (regardless of scale) quickly and efficiently. However, with so much packed into Git, it's hard to keep it all in one's head, and, if you got here by asking Google, "What is Git?," the learning curve for this DVCS can be a little on the steep side.
But, have no fear! We've got you covered with this collection of articles, tutorials, and cheat sheets that can get you started on your journey, help remind you of those pesky commands that always seem to slip your mind, or, for those more familiar with Git, show you some niche commands that you never knew you needed until now.
Before we begin, we'd like need to thank those who were a part of this article. DZone has and continues to be a community powered by contributors like you who are eager and passionate to share what they know with the rest of the world.
Let's git going!
In this article, Juri Strumpflohner breaks down the differences between Git and other Version Control Systems, walks through installation, and basic concepts, such as cloning, forking, branching, merging, and pull requests.
Kristina Pomorisac breaks down all the basics behind Git in order to get you up and going with version controlling in this two-part series. You can find parts one and two here and here, respectively.
Go behind the scenes of Git with Keith Gregory, as he walks readers through how Git actually processes user commits, branches, and merges in his article, Git Behind the Curtain: What Happens When You Commit, Branch, and Merge. For more on merging, see this tutorial by Kristina Pomorisac on all things Git Merge.
Still interested in Git's functionality? Take a look at this tutorial by Jonathan Silva, as he explains the functionality behind Git pull requests with some well-timed memes and a video tutorial.
Git Command Cheat Sheets
Want a quick and dirty cheat sheet for Git? Sahiti Kappagantula has your back with her article, 20 Git Commands With Examples.
Naresh Joshi goes in-depth on git help and git config in this article to help you when you're in a pinch and don't have time to go look at resources outside of your terminal.
For all things, branching-basics, take a look at Andy Hawthorne's article, Basic Guide to Branching With Git.
Feeling like you need a better understanding of Git's architecture and the purpose of version control? Check out Divya Bhushan's article, Git: Basic Terms and Commands Explained, as he dives into some basic theory behind Git.
Are you an avid Eclipse user? You might want to read this article by Erich Styger, as he walks readers through how to use Git with Eclipse using the EGit plugin.
More of a Visual Studio guy or gal? Check out Git Operations With Visual Studio by Arvind Singh Baghel, as he explains how to get started with Git and the IDE.
In this article by Guy Salton, learn how to integrate Jenkins with GitHub projects so you can schedule your build, pull your code from GitHub to Jenkins, and more.
See what's new with the latest version of Git, as MVB, John Vester, walks readers through the latest updates to everyone's favorite Version Control System.
Level-up on all things Git with Joseph Emswiler's series, Git: An Intermediate Guide. Currently only part one is available, but be on the lookout for new additions to come very soon!
Tired of reading and feel like you need a fun, interactive tutorial? Look no further than Mohamed Radwan's piece, Mastering Git (With Animations), as the developer provides a video tutorial on branching, merging, cherry picking, and rebasing in Git.
We all mess up. Thank goodness there's an eraser in Git! Let Tobias Gunther walk you through how to undo any mistakes you might in the process of building your latest project in his article, Undoing Things in Git.
Feeling a little unsure about version tags? Check out Git Tags: Version Control Made Easy by Kristina Pomorisac to better keep track of the many different versions of your code.
Get started with automation in Git with Juan Sebastian Lengyel in this article, as he demonstrates how to automate Git commands across repos using batch scripts and Windows Scheduler.
Are your merge requests feeling a little messy? Clean them up with help from this tutorial by Ronald van Zon, as he shows readers how to do a little housekeeping in Git. Then, in this article by Amanuel G. Shiferaw, take a look at how to keep your commit history neat and tidy with Git Squash.
Having issues with GitHub and BitBucket GUIs? Look no further than 8 Useful But Not Well-Known Git Concepts by Denny Zhang to handle any pesky problems you might be dealing with.
If you're still hungry for more niche Git commands, Tim Pattersen has your back covered in this article, as he gives readers seven more commands to add to their probably already impressive arsenal.
If you're starting to have trouble managing a large repository, then this article by Gunter Rotsaert is for you. The developer describes how to use Git LFS, an open source Git extension, to handle larger repositories.
Git, Microservices, and CI/CD
Follow along with Armitendu De, as he develops a microservice using Java and Spring and a DevOps pipeline to deploy the service with Jenkins and Docker in Microservices and DevOps Using Java, Spring Boot, Git Flow, Jenkins, and Docker.
In this article, let Sachin Slathia walk you through adding Github webhooks to a Jenkins pipeline to trigger a build you commit code to the master project of your repo.
If you didn't know, Gitlab opened up CI/CD to GitHub users. Read all about it in this article by zone leader, John Vester!
In this two-part series by Dharmendra Rathor, learn all about Git strategies to make developing and deploying your software faster and more efficiently. Parts one and two can be found here and here, respectively.
Get everything you need to know on securing branches with Divya Bhustan's article, How to Secure Your Git Project Using an Easy Branching Strategy. Divya touches on everything from creating a manageable strategy for creating branches to handling member roles and permissions.
Learn how using Git (and other version control options) can make for a more stable and secure CI/CD release cycle for your latest project in Continuous Security for GitOps by Anita Buehrle.
When it comes to storing encrypted credentials for your applicaiton, where do you put them? Take a look at a possible solution with Bozhidar Bozhanov in Storing Encrypted Credentials in Git.
Still feeling a little insecure about your repo's security? Look no further than this article by Andreas Wittig to learn about a tool to prevent you from committing sensitive information to your repo.
Git in Industry
In this article, Michael Mainguy walks readers through the dark side of Git, as he discusses best practices for creating and merging branches.
If you want a different point of view on the best practices for branching, check out Shivam Mohan's article, Git Branching: Don't (Always) Follow the Best Practices, as he lays down some situations in which best doesn't really mean best.
In this article, MVB, Paul Hammant discusses how Git could be used outside of software development in both business and government environments to better control workflow.
Is Git the Only Option?
Follow along with developer Michael Neale in Source Code Management — More Than Just Git, as he discusses other Version Control Solutions that are beginning to compete with Git in 2019.
"Learn to Git is to love Git." Truer words haven't been said. If you're really loving Git and need more articles, check out Javin Paul's article Top 5 Free Courses to Learn Git and Github in 2019.
Take a look at the first five GitHub repos that you may have never heard about but should know, and feel free to include your own recommendations in the comments in Top 10 GitHub Repositories That Will Make Your Day by Nathanael Yang.
Be a Part of the Conversation!
Think we missed something? Want to contribute? Let us know in the comments below... or, join the conversation by becoming a member of our community of thousands of developers eager to share their knowledge and passion for programming with others.
Opinions expressed by DZone contributors are their own.