What’s a repository on Github?
March 12, 2020

A repository, or Git project, encompasses the entire collection of files and folders associated with a project, along with each file’s revision history. 

A repository is like a folder for your project. Your project's repository contains all of your project's files and stores each file's revision history. You can also discuss and manage your project's work within the repository.

You can own repositories individually, or you can share ownership of repositories with other people in an organization. You can restrict who has access to a repository by choosing the repository's visibility.

The file history appears as snapshots in time called commits, and the commits exist as a linked-list relationship, and can be organized into multiple lines of development called branches. 

Now, what's a commit?

A commit, or "revision", is an individual change to a file (or set of files).

It's like when you save a file, except with Git, every time you save it creates a unique ID (a.k.a. the "SHA" or "hash") that allows you to keep record of what changes were made when and by who. Commits usually contain a commit message which is a brief description of what changes were made.

And, what's a Branch?

A branch is a parallel version of a repository.

It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the master branch to publish your changes.

Use a branch to isolate development work without affecting other branches in the repository. Each repository has one default branch, and can have multiple other branches. You can merge a branch into another branch using a pull request.

You can use branches to develop features, fix bugs or just safely experiment with new ideas.



Leave a Reply

Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to set opacity or transparency using CSS? #3 Pagination in CSS with multiple examples #4 How to make HTML form interactive and using CSS? #5 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #6 How to uninstall Cocoapods from the Mac OS?

Recently Posted

Mar 4 How to use data-* Attributes in HTML? Mar 4 The substr() method in JavaScript and how it’s different from substring() Mar 4 A complete guide to add responsive YouTube videos using HTML and CSS Mar 3 How to embed YouTube or other video links in WordPress? Mar 3 How to change the Login Logo in WordPress? Mar 3 substring() Method in JavaScript

You might also like these

The difference between isFinite() method and isFinite() function in JavaScriptJavaScript5 Key Principles Of Good Website UsabilityUI/UXHow to get recent posts in WordPress?WordPress4 different Ways to Get JavaScript OutputJavaScriptHow to Create a Backup From Any Database in SQL?SQL/MySQLHAVING Clause in Postgres with Examples in All Aggregate FunctionsPostgres