{"id":49033,"date":"2018-05-16T13:00:00","date_gmt":"2018-05-16T18:00:00","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=49033"},"modified":"2018-05-16T13:00:00","modified_gmt":"2018-05-16T18:00:00","slug":"git-version-control-series-what-is-git","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/products\/git-version-control-series-what-is-git\/","title":{"rendered":"Git Version Control series: What is Git?"},"content":{"rendered":"
This is the first in a series of blog posts around Git and a new feature in version 72,\u00a0Git Version Control<\/a>.\u00a0 See the full list of entries in this series at the end of this post!\u00a0<\/em><\/p>\n If you follow our\u00a0feature request site<\/a>, you already know about our upcoming feature, Git Version Control<\/a>. We’re designing it to make hosting repositories as easy for developers as a “Hello World!” script. Before we send the feature your way, though, we want to make sure you’re familiar with Git.<\/p>\n Git is version control software<\/span>. Whenever you change Git-managed content, Git\u00a0records it\u00a0and<\/strong>\u00a0stores the history of every change you’ve made. Git was designed for the Linux kernel, and it’s great for software developers. That’s not the\u00a0end of what it can do, though. You can use it for any project that’s stored as files, like web design or document storage. There’s even a cPanel employee who uses it for their grocery lists!<\/p>\n No matter how you use Git, any number of people can work on the same project at the same time\u00a0without<\/strong>\u00a0traffic jams.<\/p>\n Git stores your data in databases called repositories.\u00a0 You can create a repository on your cPanel account, or you can copy\u00a0(in Git, “clone”) an existing repository. Our Git Version Control feature will support both options.<\/p>\n When you work with Git, you can have a single repository for your project, or\u00a0you can have a more complicated structure.<\/p>\n <\/a><\/p>\n A simple Git setup using one repository.<\/em><\/p>\n <\/a><\/p>\n A multi-layer setup with project-specific repositories that merge into a main repository. cPanel uses this kind of setup. It’s great for projects that have multiple teams working on different things.<\/em><\/p>\n Branches separate lines of development by “branching” changes off of the main repository’s history. \u00a0Git’s pretty flexible when it comes to how you use branches so you can manage them, however, works best for your team. Each person could have their own branch, or everyone might work on the same task-specific branches.<\/p>\n <\/a><\/p>\n Nope, this isn’t a subway map! Just a peek at how Git branching might look over time.<\/em><\/p>\n You aren’t limited to working on a single branch at a time, either. Simple commands allow you to get changes and branches from the remote repository.\u00a0You can also have repositories or branches that only exist on your cPanel account.<\/span>\u00a0You can switch between\u00a0(in Git, “check out”<\/span>) those branches and manage them as needed. You can grab your teammates’\u00a0changes (in Git, “pulling”)<\/span>\u00a0in real time, too so you can incorporate them into your copy of the project as you go.<\/p>\n After you make changes, you can send them up to the main repository so that everyone can access them. To do this, you need a commit.<\/p>\n Commits package up your changes with author information and other change history. When you commit changes, you also create a commit message to send with them.\u00a0(Good commit messages make Git\u00a0really<\/em>\u00a0useful. There are\u00a0<\/span>some<\/span><\/a>\u00a0<\/span>great<\/span><\/a>\u00a0guid<\/span><\/a>es<\/span><\/a>\u00a0to writing good commit messages.)<\/span>\u00a0Once you’ve got everything in your commit, you send\u00a0(in Git, “push”<\/span>) your changes to the main repository.<\/p>\n This<\/span>\u00a0post only describes the simplest uses of Git, but there are lots of other features to take advantage of! Among other things, you can easily:<\/p>\n Often, people only use Git on the command line. Our upcoming feature will let you create and manage repositories\u00a0and<\/strong>\u00a0view change history in a friendly interface.\u00a0A lot of Git’s functionality requires\u00a0<\/span>command line<\/span><\/a>\u00a0<\/span>knowledge<\/a>, but don’t worry! It’s easy to learn.<\/span>\u00a0We’re also including automatic deployment by default, to make sure that cloned cPanel-hosted repositories automatically pull new changes.<\/p>\n If you already use Git, we hope that this\u00a0feature will knock your socks off! If you don’t, we’re hoping we can help you start.<\/p>\n A note fro<\/span>m benny: <\/span><\/em><\/p>\n Want to be involved in the development process? Post your ideas, comments, and questions on the\u00a0feature request<\/a>. You can also join us in our slack<\/a> or discord<\/a> channels, post your questions on the cPanel forums<\/a> or subreddit<\/a>, or come visit Houston, Texas for the 2018 cPanel Conference<\/a>, October 1st – 3rd. Need to catch up on the previous posts about Git Version control? Here they are!<\/em><\/p>\n This is the first in a series of blog posts around Git and a new feature in version 72,\u00a0Git Version Control.\u00a0 See the full list of entries in this series at the end of this post!\u00a0 If you follow our\u00a0feature request site, you already know about our upcoming feature, Git Version Control. We’re designing it […]<\/p>\n","protected":false},"author":77,"featured_media":64933,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[49],"tags":[2021,653,2025,1869,2029],"class_list":["post-49033","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-products","tag-cpanel-git-integration","tag-git","tag-git-version-control","tag-v72","tag-version-72"],"acf":[],"yoast_head":"\n
\nWhat is Git?<\/h3>\n
Repositories<\/h3>\n
Branches<\/h3>\n
Commits<\/h3>\n
Using Git’s full potential<\/h3>\n
\n
\n\n