Resource icon

Git Repository [GIT Real Learn advanced Git techniques] Mastering GitHub Video Course Tutorial 2019 1.0

Git Repository Version Control [GIT Real Learn advanced Git techniques] Mastering GitHub Video Course Tutorial 2019 [CodeSchool] Free Download

[Premium Code School Tutorials]

Login or Signup For Download

GitHub

GitHub is a web-based version-control and collaboration platform for software developers.

Git is used to store the source code for a project and track the complete history of all changes to that code. It allows developers to collaborate on a project more effectively by providing tools for managing possibly conflicting changes from multiple developers. GitHub allows developers to change, adapt and improve software from its public repositories for free, but it charges for private repositories, offering various paid plans. Each public or private repository contains all of a project's files, as well as each file's revision history. Repositories can have multiple collaborators and can be either public or private.

GitHub facilitates social coding by providing a web interface to the Git code repository and management tools for collaboration. GitHub can be thought of as a serious social networking site for software developers. Members can follow each other, rate each other's work, receive updates for specific projects and communicate publicly or privately.

Three important terms used by developers in GitHub are fork, pull request and merge. A fork, also known as a branch, is simply a repository that has been copied from one member's account to another member's account. Forks and branches allow a developer to make modifications without affecting the original code. If the developer would like to share the modifications, she can send a pull request to the owner of the original repository. If, after reviewing the modifications, the original owner would like to pull the modifications into the repository, she can accept the modifications and merge them with the original repository. Commits are, by default, all retained and interleaved onto the master project, or can be combined into a simpler merge via commit squashing.

Because GitHub is so intuitive to use and its version-control tools are so useful for collaboration, nonprogrammers have also begun to use GitHub to work on document-based and multimedia projects. GitLab is an open source alternative to GitHub.

GitHub products and features
GitHub offers an on-premises version in addition to the well-known SaaS product. GitHub Enterprise supports integrated development environments and continuous integration tool integration, as well as a litany of third-party apps and services. It offers increased security and auditability than the SaaS version.

Other products and features of note include:

  • Github Gist allows GitHub users to share pieces of code or other notes.
  • GitHub Flow is a lightweight, branch-based workflow for regularly updated deployments.
  • GitHub Pages are static webpages to host a project, pulling information directly from an individual's or organization's GitHub repository.
  • GitHub Desktop enables users to access GitHub from Windows or Mac desktops, rather than going to GitHub's website.
  • GitHub Student Developer Pack is a free offering of developer tools that is limited to students, and includes cloud resources, programming tools and support, and GitHub access.

Setting Up a Git Repository

Learn more advanced concepts of Git version control. Increase your Git knowledge by learning more advanced systems within Git.

Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

First of all we need to install git on the remote server (lets call it server.com). The easiest way is to use yum to download and install the git software. The command is yum install git. yum will download all necessary files including dependencies if needed and... install the base git software.

OK now that the software has been installed in the server.. its time to create a Git repository for your project in server.com.

Login to remote server
$ ssh server.com
Last login:.....

Create a directory (in any location you like) for the repository. I will be using /usr2/git/ as the remote dir here

$ mkdir /usr2/git/project.git

Now go to the newly created directory and Create your new project git repo as a bare Git repository using the following command

$ git --bare init
Initialized empty Git repository in /usr2/git/project.git


Now that the repo has been created in the server, lets focus on your local machine. I will be starting with a new directory on the local machine. So create a dir in the local machine and go in to the dir

$ mkdir project
$ cd project

Now Initialize the local repository

$ git init
Initialized empty Git repository


Now we have our repository in the server (remote branch) as well as the one in our local machine (local branch), lets add it to our local repository as a remote server called "origin" using git remote add,

$ git remote add origin ssh://user@server.com/usr2/git/project.git

Next step is to upload the code base code to the remote server. Before doing this, copy your code to the local branch. Once this is done prep the files for upload using the following command

$ git add.

git add
will add files to the "index". The index represents "your current changeset" and is what will be committed to the remote branch. Unlike Subversion modified files won't be committed unless you git add them first. Now Now let's commit this code whilst adding a comment mentioning the reason for commit.

$ git commit -m "Initial Code Upload to remote repo"

Now The time has come to push our local master branch to the origin's master branch. We do that using the git push command

$ git push origin master

That's it.. we are done. If you need to do more pushes, then it can be done by repeating the git push command.

If you need to pull an update from the remote branch, use the following command

$ git pull ssh://user@server.com/usr2/git/project.git

How Does Git Benefit The Web Development

In order to know about the benefits of the Git, we first need to understand what it is. Git is a kind of Version Control System or VCS that can track all the changes that are made to the computer files. Version control is an important component of the software configuration management process. It is actually the swift management of the changes that are made to the computer programs, documents, websites, databases and other information sources.

Git provides for better coordination with multiple users giving the required attention to the file while working on them simultaneously. Git is often used for developing software, but can also be used for knowing precisely about the file changes.

As we can see, Git for websites is well distributed and possesses collective and integrated features that provide for speedy revision and control of files, in less time and with minor efforts. It can also be used for the nonlinear and distributed processes and workflows and hence has wide usage.

Some of the desired characteristics of Git include:

  • Enhance support for the non-linear web development processes
  • Distributed development
  • Compatibility with the protocols and extant systems (including FTP, HTTP, Rsync, SSH, or even a plain socket)
  • Scalable and efficient styling of the large projects
  • Cryptographic authentication
  • Toolkits
  • Easy backup

Git Web Development Workflow

Git web development workflow offers relief from all the mess and chaos that relates to web development. It is a kind of time insurance where all your data is backed-up and all the steps are recorded on the cloud.

The GitHub Repository

GitHub repository
has almost everything that a web developer might need. It contains:

  • Web application frameworks,
  • Wikis,
  • Animations,
  • HTML and other libraries,
  • Lessons on programming languages,
  • Plethora of resources,
  • Wireless communication,
  • 3D modeling,
  • A server-less architecture

Git does not require a central server and hence is always available to the web development agencies. Each of developers is provided with his or her own repository and has a complete record and information of every change. The developers can use their own repository any time they wish, and can later push the changes to the central server.

How to use Git

You just need to add the public key to GitHub. Then insert the remote address when asked for, and press the "clone". Your Github code is subsequently deployed on web application automatically. You will get the updates automatically through the Company cloud console.
Author
murugans1011
Downloads
16
Views
271
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from murugans1011

Share this resource

Top