{"id":95811,"date":"2023-08-18T11:01:09","date_gmt":"2023-08-18T09:01:09","guid":{"rendered":"https:\/\/happybrain.it\/?p=95811"},"modified":"2023-08-24T11:07:23","modified_gmt":"2023-08-24T09:07:23","slug":"che-cose-un-repository","status":"publish","type":"post","link":"https:\/\/happybrain.it\/en\/2023\/08\/18\/che-cose-un-repository\/","title":{"rendered":"What a repository is?"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column column_width_percent=&#8221;80&#8243; gutter_size=&#8221;3&#8243; overlay_alpha=&#8221;50&#8243; shift_x=&#8221;0&#8243; shift_y=&#8221;0&#8243; shift_y_down=&#8221;0&#8243; z_index=&#8221;0&#8243; medium_width=&#8221;0&#8243; mobile_width=&#8221;0&#8243; width=&#8221;1\/1&#8243;][vc_empty_space empty_h=&#8221;1&#8243;][vc_column_text uncode_shortcode_id=&#8221;134784&#8243;]Have you ever heard this term uttered by some developer or read it online in some super technical article?!<\/p>\n<p>Repository is a <strong>software<\/strong> that allows you to store a considerable amount of code and files by assigning them a unique number that identifies different versions of them. Imagine a large virtual central repository where you can digitally <strong>store<\/strong> your data with the ability to classify them by metadata, protect, process or duplicate them.<\/p>\n<p>This is why repositories prove to be faithful allies of developers, precisely because they allow you to make and manage <strong>changes to an application&#8217;s source code<\/strong> while always retaining a copy of the previous version.[\/vc_column_text][vc_single_image media=&#8221;95866&#8243; media_width_percent=&#8221;100&#8243; uncode_shortcode_id=&#8221;119510&#8243;][vc_custom_heading text_size=&#8221;h3&#8243; sub_reduced=&#8221;yes&#8221; uncode_shortcode_id=&#8221;187173&#8243;]How it works[\/vc_custom_heading][vc_column_text uncode_shortcode_id=&#8221;887170&#8243;]Through the use of repositories, it is possible to work on the program code of a piece of software without compromising the code visible online, a kind of &#8220;copy.&#8221;<\/p>\n<p>The main commands to keep in mind are:<\/p>\n<ol>\n<li>pull =&gt; retrieves the most recent version of the project;<\/li>\n<li>push =&gt; prepares the changes for submission;<\/li>\n<li>commit =&gt; sends a new version of the files;<\/li>\n<li>merge =&gt; combine different versions of the same file made by several people at different stages or if pull fails;<\/li>\n<li>deploy =&gt; upload changes to the server;<\/li>\n<li>stash =&gt; to save as a draft changes locally made and return to a clean working directory;<\/li>\n<li>clean =&gt; to remove any changes saved as a draft.<\/li>\n<\/ol>\n<p>The project can be organized into multiple <strong>branches<\/strong>. Typically there is a development branch to handle new requests and features being tested, and a production branch for the public version of the project.[\/vc_column_text][vc_custom_heading text_size=&#8221;h3&#8243; sub_reduced=&#8221;yes&#8221; uncode_shortcode_id=&#8221;172817&#8243;]Team work[\/vc_custom_heading][vc_column_text uncode_shortcode_id=&#8221;113846&#8243;]The repository also makes it easier to collaborate on the same project because you can simultaneously edit files remotely thanks to <strong>centralized information management.<\/strong><\/p>\n<p>This allows different developers, participating in the same project, to share their work, folders, text files, and other types of documents, with colleagues.<\/p>\n<p>The various changes made to the code are tracked and monitored, throughout its development phase, from design to release.<\/p>\n<p>An added value lies in the automatic comparison of previous and new files, with reports viewable before any new commit.[\/vc_column_text][vc_single_image media=&#8221;95888&#8243; media_width_percent=&#8221;100&#8243; uncode_shortcode_id=&#8221;116598&#8243;][vc_custom_heading text_size=&#8221;h3&#8243; sub_reduced=&#8221;yes&#8221; uncode_shortcode_id=&#8221;934047&#8243;]Bitbucket e Github[\/vc_custom_heading][vc_column_text uncode_shortcode_id=&#8221;119648&#8243;]These are the two most widely used code repository services in the world, both platforms operating similarly to provide directories for both public and private files.<br \/>\n[\/vc_column_text][vc_column_text uncode_shortcode_id=&#8221;129794&#8243;]<strong>BITBUCKET<\/strong><br \/>\nWe begin by dealing with Bitbucket, a web-based version control repository service for Git written in Python, based on Atlassian&#8217;s cloud.<\/p>\n<p>In recent times this platform has become quite popular mainly due to its flexible pricing structure that makes it unique.<\/p>\n<p>In fact, Bitbucket, although it offers standard features, has the advantage of making <strong>unlimited private and public repositories available for free.<\/strong><\/p>\n<p>Holding the best value for money, it represents a cost-effective solution you should focus on if you are a professional or a business looking for a secure hosting service for developing your private and proprietary code, especially if you do not intend to make it public in its entirety.[\/vc_column_text][vc_column_text uncode_shortcode_id=&#8221;186815&#8243;]<strong>GITHUB<\/strong><br \/>\nWe now come to talk about GitHub, the most popular development platform used by developers around the world. It is an open source repository service, written in Ruby and Erlang, that focuses on public code.<\/p>\n<p>You can host and review code, develop software and ultimately manage your development projects. It provides <strong>unlimited free public repositories<\/strong> and is suitable for both personal and business development projects.<\/p>\n<p>Being cloud-based, it allows developers to store and work on project codes in an efficient and organized manner.<\/p>\n<p>Through its additional features aimed at improving collaboration among developers, you can participate in discussions by making your knowledge and expertise, within the framework of public projects on GitHub, available to your colleagues.[\/vc_column_text][vc_single_image media=&#8221;95870&#8243; media_width_percent=&#8221;100&#8243; uncode_shortcode_id=&#8221;198417&#8243;][vc_custom_heading text_size=&#8221;h3&#8243; sub_reduced=&#8221;yes&#8221; uncode_shortcode_id=&#8221;180597&#8243;]Monorepo e Multirepo[\/vc_custom_heading][vc_column_text uncode_shortcode_id=&#8221;198414&#8243;]<em>How are codebases hosted and managed through Git?<\/em><\/p>\n<p>Through two approaches:<\/p>\n<ul>\n<li><strong>Monorepo<\/strong>, uses a single repository to host all the code for the multiple libraries or services that make up a company&#8217;s projects or even the company&#8217;s entire codebase itself.<\/li>\n<li><strong>Multirepo<\/strong>, divides the code into units, it uses several independent repositories to host the multiple libraries or services of a project developed by a company.<\/li>\n<\/ul>\n<p>The difference between the two is quite intuitive; if you choose to use the monorepo approach, members of different teams will have to move in unison making decisions together before putting them into practice. Otherwise with regard to multirepo the different teams will be able to move independently, making changes without the need to confront each other in advance.<\/p>\n<p>With this article we hope to have clarified your ideas regarding Repositories and their use. Once you have identified the use you need to make of them, it only remains for you to choose the option that best suits you![\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Repository faithful ally for all web developers! Better Bitbucket or GitHub? Learn how they work in a few simple words and decide which is the best way to organize your project.<\/p>\n","protected":false},"author":13,"featured_media":95867,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[281,406],"tags":[235,427,477,478],"class_list":["post-95811","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-design","category-about-web","tag-web-design","tag-tool","tag-repository","tag-development"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/posts\/95811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/comments?post=95811"}],"version-history":[{"count":0,"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/posts\/95811\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/media\/95867"}],"wp:attachment":[{"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/media?parent=95811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/categories?post=95811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/happybrain.it\/en\/wp-json\/wp\/v2\/tags?post=95811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}