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.

Sources


Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to add Read More Read Less Button using JavaScript? #3 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #4 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #5 How to uninstall Cocoapods from the Mac OS? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface
You might also like these
How to use Context in React?ReactHow to Add, Edit and Delete a Workflow in Etrieve?MiscellaneousHow to change style of nth-child using jQuery?jQueryJavaScript Input Validation Theme Park Example using throw StatementJavaScriptHow to define variables in SCSS (Sass)?SCSSReading Multiple Inputs in SwiftSwift