Yogesh Chauhan's Blog

What’s a repository on Github?

in Miscellaneous on 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.


Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #3 How to add Read More Read Less Button using JavaScript? #4 How to uninstall Cocoapods from the Mac OS? #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to Use SQL MAX() Function with Dates?

Recently Posted

#Aug 15 Is PHP still good for back-end programming? #Aug 10 How to create a multisite network in WordPress? #Aug 3 How to create a circle that follows a cursor using JavaScript and CSS? #Aug 3 How to make a curtain slider using jQuery and CSS? #Aug 2 How to progressively load images and add a blurry placeholder? #Aug 1 How to create a placeholder loader (throbber) using CSS?
You might also like these
The difference between 400(4xx) and 500(5xx) errorsMiscellaneousDebugging in WordPress Part 3: SCRIPT_DEBUG and SAVEQUERIESWordPressHow to auto-resize textarea based on text input using JavaScript or jQuery?JavaScriptThe :last-of-type selectorCSSHow to Commit and Rollback Changes in SQL?SQL/MySQLHow to merge arrays in JavaScript?JavaScript