¿Qué es GitHub?


HTML

GitHub es una plataforma de alojamiento de código para colaboración y control de versiones.

GitHub te permite a ti (y a otros) trabajar juntos en proyectos.


Regístrese en GitHub en https://github.com/:

GitHub

Los elementos esenciales de GitHub son:

  • Repositorios
  • Sucursales
  • confirma
  • Solicitudes de extracción
  • Git (el software de control de versiones en el que se basa GitHub)

Ejemplo

$ git push origin heroku
$ cd /etc/
$ ls

Repositorio

Se puede usar un repositorio de GitHub para almacenar un proyecto de desarrollo .

Puede contener carpetas y cualquier tipo de archivos (HTML, CSS, JavaScript, Documentos, Datos, Imágenes).

Un repositorio de GitHub también debe incluir un archivo de licencia y un archivo README sobre el proyecto.

Un repositorio de GitHub también se puede usar para almacenar ideas o cualquier recurso que desee compartir.


Rama

A GitHub branch is used to work with different versions of a repository at the same time.

By default a repository has a master branch (a production branch).

Any other branch is a copy of the master branch (as it was at a point in time).

New Branches are for bug fixes and feature work separate from the master branch. When changes are ready, they can be merged into the master branch. If you make changes to the master branch while working on a new branch, these updates can be pulled in.


Commits

At GitHub, changes are called commits.

Each commit (change) has a description explaining why a change was made.


Pull Requests

Pull Requests are the heart of GitHub collaboration.

With a pull request you are proposing that your changes should be merged (pulled in) with the master.

Pull requests show content differences, changes, additions, and subtractions in colors (green and red).

As soon as you have a commit, you can open a pull request and start a discussion, even before the code is finished.

A a great way to learn GitHub, before working on larger projects, is to open pull requests in your own repository and merge them yourself.

You merge any changes into the master by clicking a "Merge pull request" button.

GitHub

After merging you can delete the branch by clicking a "Delete branch button".

GitHub