✒️SAP BTPFIORI / Los sistemas de control de versiones Por Jaime Gomez Arango

Selector Alummnos / Empresas

CVOSOFT UNITED STATES OF AMERICA | 17 años de ingeniería dedicados a formación profesional de Consultores SAP | +info

SAP BTPFIORI Los sistemas de control de versiones

SAP BTPFIORI Los sistemas de control de versiones

1 | Version Control Systems

Centralized and Distributed Version Control Systems

Version control systems are essential tools for managing changes to source code over time. There are two primary types: centralized and distributed.

  • Centralized Version Control Systems (CVCS): In a centralized system, such as Subversion (SVN), all version history is stored on a central server. Developers check out files, work on them locally, and then check the files back into the central server. This setup means that to work on the code, you must be connected to the server.
  • Distributed Version Control Systems (DVCS): In contrast, a DVCS like Git, Mercurial, or Bazaar allows each developer to have a full copy of the repository on their local machine. This enables them to work offline and later synchronize their changes with the central repository once they reconnect to the network.

Advantages of Distributed Version Control Systems:

  • Change Tracking: Every change to the files is recorded with details such as the time, the author, and a message describing the change.
  • Synchronization: Multiple developers can work on the same project simultaneously and keep their copies up-to-date with the latest changes.
  • Backup and Restoration: Changes can be saved, and any file can be restored to any previous state.
  • Branching and Merging: Developers can create branches to work on new features independently and merge them back into the main project when ready.

Characteristics of Git:

Git is particularly noted for its efficiency in managing branches. It allows developers to make changes in separate branches and merge them with the main project effortlessly. This makes it an invaluable tool for collaborative development.

2 | What is Git?

Git is a powerful version control system used to manage and track changes in code. It is known for its speed, simplicity, and reliability in maintaining versions of projects with numerous files. Git was designed to facilitate efficient, collaborative development by allowing developers to work on their local copies and synchronize changes with a global repository.

Benefits of Git:

  • Speed and Efficiency: Git is exceptionally fast in handling branches, which makes it suitable for large projects.
  • Distributed Development: Every developer has a complete copy of the repository, allowing for offline work and reducing the risk of data loss.
  • Flexibility: Branching and merging are core features that support multiple lines of development.
  • Open Source and Community Support: Git is free and open-source, with extensive community support and numerous resources available.

3 | Advantages of Git

Git provides several significant advantages over traditional version control systems:

  • No Single Point of Failure: Being a distributed system, Git does not rely on a central server, which allows work to continue even if the server is down.
  • Integration: Git integrates seamlessly with various development tools and platforms, supporting continuous integration and deployment, automated testing, and work item tracking.
  • Community Support: Git's popularity ensures robust community support, abundant resources, and tools for developers.
  • Team Productivity: Git enhances team productivity by enabling collaboration, policy enforcement, process automation, and improved visibility of work.
  • Branch Policies and Pull Requests: Platforms like GitHub and Azure DevOps allow teams to set branch policies and conduct code reviews through pull requests, ensuring code quality and knowledge sharing.

4 | The Distributed System

The Repository

A Git repository is a collection of files and their version history, organized in a directory structure. It includes the following key areas:

  • Working Directory: The workspace where developers modify files. Changes here are in the "Modified" state.
  • Staging Area: Files that are staged for the next commit. These changes are in the "Prepared" state.
  • Git Repository: The database where committed changes are stored permanently. Once changes are committed, they move from the "Prepared" to the "Confirmed" state.

The Three States in Git:

  • Modified: Changes are made in the working directory.
  • Staged: Changes are selected and staged in preparation for a commit.
  • Committed: Changes are saved in the repository.

5 | The Stages of a File in Git

Workflow and Commands

  • git add: Moves changes from the working directory to the staging area.
  • git commit: Records the staged changes in the repository with a descriptive message.

Branching and Merging

Branches are essential for managing different lines of development. The main branch, typically called "master" or "main," contains the stable code ready for production. Other branches are created for new features or fixes and are merged back into the main branch once the work is complete.

  • Creating a Branch: Use git checkout -b branch_name to create a new branch.
  • Merging Branches: Use git merge branch_name to merge changes from a branch into the current branch.

Advanced Workflows

In advanced workflows, continuous integration systems automatically check for conflicts during merges. Developers are notified of conflicts, which they must resolve before the merge is completed. Once resolved, changes are merged into the "development" branch and then into "master" for production deployment.

# Basic Commands

# Initialize a new Git repository
git init

# Clone a repository into a new directory
git clone <repository_url>

# Show the working directory status
git status

# Add a file to the staging area
git add <file>

# Commit changes with a message
git commit -m "commit message"

# Show the commit history
git log

# Show changes between commits, commit and working tree, etc.
git diff

# Display help information about Git
git help

# Set the global username
git config --global user.name "Your Name"

# Set the global email address
git config --global user.email "[email protected]"


# Intermediate Commands

# List all branches
git branch

# Create a new branch
git branch <branch_name>

# Switch to a different branch
git checkout <branch_name>

# Merge a branch into the current branch
git merge <branch_name>

# List remote repositories
git remote -v

# Fetch branches and commits from the remote repository
git fetch

# Fetch and merge changes from the remote repository
git pull

# Push changes to the remote repository
git push

# Remove a file from the working directory and staging area
git rm <file>

# Stash changes in the working directory
git stash

# Apply stashed changes
git stash pop

# Create a new tag
git tag <tag_name>

# Show various types of objects (commits, tags, etc.)
git show <commit>


# Advanced Commands

# Reapply commits on top of another base tip
git rebase <branch_name>

# Apply the changes introduced by some existing commits
git cherry-pick <commit>

# Revert a previous commit
git revert <commit>

# Reset current HEAD to the specified state
git reset <commit>

# Start binary search to find the commit that introduced a bug
git bisect start

# Mark the current commit as bad
git bisect bad

# Mark the current commit as good
git bisect good

# Show the reference logs
git reflog

# Rewrite branches with a filtered history
git filter-branch --tree-filter '<command>' HEAD

# Show what revision and author last modified each line of a file
git blame <file>

# Add a new submodule to the repository
git submodule add <repository_url>

# Cleanup unnecessary files and optimize the local repository
git gc

 

Escanear / Compartir

 

 


Sobre el autor

Publicación académica de Jaime Eduardo Gomez Arango, en su ámbito de estudios para la Carrera Consultor SAP BTP Fiori.

SAP Expert


Jaime Eduardo Gomez Arango

Profesión: Ingeniero de Sistemas y Computación - España - Legajo: SW34C

✒️Autor de: 149 Publicaciones Académicas

🎓Egresado de los módulos:

Disponibilidad Laboral: FullTime

Presentación:

Ingeniero de sistemas y computación con 8 años de experiencia el desarrollo frontend & backend (react/node) y en cloud (aws), actualmente desarrollando habilidades en sap btp, ui5, abap y fiori.

Certificación Académica de Jaime Gomez

✒️+Comunidad Académica CVOSOFT

Continúe aprendiendo sobre el tema "Los sistemas de control de versiones" de la mano de nuestros alumnos.

SAP Junior

Sistemas de control de versiones En programación, los sistemas de control de versiones se refieren a la capacidad de registrar y administrar los cambios realizados sobre los archivos del código fuente de un proyecto. Permiten llevar un historial de modificaciones, facilitando el trabajo colaborativo y el mantenimiento del software a lo largo del tiempo. Gracias a estos sistemas, los desarrolladores pueden volver a versiones anteriores, comparar cambios, identificar quién modificó un archivo y detectar cuándo se introdujo un error. Existen dos tipos principales de sistemas de control de versiones. Los sistemas de control de versiones centralizados (VCS) utilizan un único repositorio central donde se almacena...

Acceder a esta publicación

Creado y Compartido por: Candela Analia Nuñez

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP SemiSenior

Los sistemas de control de versiones 1. Introducción En el desarrollo de aplicaciones SAPUI5 —y en general en cualquier entorno de programación colaborativo— es esencial mantener un registro ordenado y controlado de los cambios realizados en el código fuente. Para lograrlo se utilizan los sistemas de control de versiones (VCS, Version Control Systems), herramientas que permiten gestionar la evolución del software, registrar cada modificación, identificar autores de los cambios y, en caso necesario, volver a versiones anteriores. SAP, a través de su entorno SAP Business Application Studio (BAS) y otras herramientas de desarrollo, integra de forma nativa el uso de Git, que es el sistema de...

Acceder a esta publicación

Creado y Compartido por: Jose Rodrigo Baz Suarez / Disponibilidad Laboral: FullTime + Carta Presentación

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Master

El sistema de control de versiones: capacidad para controlar los cambios realizados en el codigo fuente VCS (Sistema de control de versiones centralizado): Programa que controla las versiones, permite recuperar archivos si se pierden, permite recuperar versiones, permitre trabajar de manera multiple a los desarrolladores. DVCS (Sistema de control de versiones distribidos): Permite trabajar de manera local. Realiza control de cambios, permite que varias personas trabajen de manera simultanea y tengan la ultima version, recuperar información, restaurar archivos, crear un branch (crear copias y trabajar en ellas), realizar merge (cuando trabajamos en la copias y las replicamos al original). GIT: Es un software para el control de...

Acceder a esta publicación

Creado y Compartido por: Claudia Bibiana Monsalve Lopez

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

1. EL SISTEMA DE CONTROL DE VERSIONES: permite la capacidad de registrar los cambios realizados sobre los archivos del codigo fuente. Tenemos 2 tipos de sitemas de control de versiones: Los sitemas de control de Versiones Centralizados (VCS). permite revertir los archivos seleccionados o el proyecot completo a un estado anterior subversion: herramienta en la que ha confiado para guardar un historico de revision de versiones, en un punto centralizado---> problema si perdemos conectividad Los sistemas de control de Verstions Distribuidos (DVCS). nos permite crear un repositorio local y poder trabajar de manera local SIN NECESIDAD DE ESTAR CONECTADO A LA RED. ejemplos: Git, Mercurial,...

Acceder a esta publicación

Creado y Compartido por: Roberto Hernan Santucho

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Expert


GIT es un sistema de control de versiones distribuidas fue inventado en el año 2005 por Linux Torvalds creador del sistema operativo Linux, la principal característica de GIT frente a otras opciones del mercado como sub-versions o CVF es que GIT es un sistema distribuido esto quiere decir que toda la historia de versiones del código fuente no reside en un servidor sino que lo tiene de manera local esto permite que no tengamos la necesidad de conectarnos a internet para usar GIT sino que desde nuestra computadora podemos usarlo, el software es gratis y tiene una gran comunidad que le da soporte al sistema. El GIT tiene un sistema de trabajo en ramas que lo hace especialmente potente en cuanto a la funcionalidad de las ramas...

Acceder a esta publicación

Creado y Compartido por: Jose Medina / Disponibilidad Laboral: FullTime + Carta Presentación

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Expert


1 | Version Control Systems Centralized and Distributed Version Control Systems Version control systems are essential tools for managing changes to source code over time. There are two primary types: centralized and distributed. Centralized Version Control Systems (CVCS): In a centralized system, such as Subversion (SVN), all version history is stored on a central server. Developers check out files, work on them locally, and then check the files back into the central server. This setup means that to work on the code, you must be connected to the server. Distributed Version Control Systems (DVCS): In contrast, a DVCS like Git, Mercurial, or Bazaar allows each developer to have a full copy of the repository on their local machine. This...

Acceder a esta publicación

Creado y Compartido por: Jaime Eduardo Gomez Arango / Disponibilidad Laboral: FullTime + Carta Presentación

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Senior

¿Qué es Git? Git es un sistema de control de versiones distribuido que permite a los desarrolladores realizar un seguimiento de los cambios en el código fuente durante el desarrollo de software. Fue creado por Linus Torvalds y es conocido por ser eficiente, flexible y escalable. Principales conceptos de Git: Repositorio: Un repositorio es un espacio donde se almacena la información relacionada con un proyecto. Puede ser local o remoto. Commit: Un commit es un conjunto de cambios en el código. Cada commit tiene un mensaje que describe los cambios realizados. Rama (Branch): Una rama es una línea de...

Acceder a esta publicación

Creado y Compartido por: Claudio Marcelo Hermann / Disponibilidad Laboral: FullTime

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Junior

Git - manejo de versiones software que permite el manejo de control de versiones de nuestro codigo. Ventajas de Git desarrollo simultaneo: podemos tener nuestro propia copia de codigo en local y trabajar simultaneamente en nuestras propias ramas o branches. versiones mas rapidas. integracion integrada:git es compatible en la mayoria de herramientas y productos. soporte tecnico de una comunidad solida. git funciona con cualquier equipo. solicitudes de incorporacion de cambios: permite analizar cambios con el team antes de fusionarlos a la main branch. Repositorio conjunto de archivos almacenados en una o varias carpetas para el manejo y configuracion de nuestro proyecto. working directory: aqui donde realizamos cambios...

Acceder a esta publicación

Creado y Compartido por: Gabriel Gavaz

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Senior

El sistema de control de versiones El control de versiones en programación se refiere a registrar los cambios en el código fuente. Hay dos tipos de sistemas: los centralizados y los distribuidos. Los sistemas centralizados permiten controlar las modificaciones del código y revertir cambios, comparar diferencias, y recuperar archivos perdidos. También facilitan el trabajo simultáneo de desarrolladores en un proyecto. Por otro lado, los sistemas distribuidos permiten crear repositorios locales y trabajar sin conexión a la red. Algunos ejemplos son Git, Mercurial y Bazaar. Los sistemas distribuidos tienen características como reporte de cambios, sincronización, backup y restauración,...

Acceder a esta publicación

Creado y Compartido por: Nilson Parra Martinez / Disponibilidad Laboral: PartTime

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Junior

Los sistemas de Control de Versiones Centralizados (VCS) Son aplicaciones que nos permite realizar el control de modificaciones del código fuente de manera automática y eficiente. Podemos dar seguimiento quien realizo modificaciones y causo algún incidente en el código. GIT: Es un sistemas de control de versiones distribuidas fue inventado en el año 2005 por Linux Torbal creador del conocido sistema operativo Linux. Principal característica es que GIT es un sistema distribuido. No dependemos de internet y es gratuito también tiene una gran comunidad que le da soporte al sistema.

Acceder a esta publicación

Creado y Compartido por: Henry Nelson Loja Duchimaza / Disponibilidad Laboral: FullTime

 


 

👌Genial!, estos fueron los últimos artículos sobre más de 99.000 publicaciones académicas abiertas, libres y gratuitas compartidas con la comunidad, para acceder a ellas le dejamos el enlace a CVOPEN ACADEMY.

🔎Buscador de Publicaciones:

 


 

No sea Juan... Solo podrá llegar alto si realiza su formación con los mejores!