Showing posts with label Git. Show all posts
Showing posts with label Git. Show all posts

Friday, April 6, 2018

Introduction to GIT

Content:

  1. Getting a Git Repository
  2.     1.1 How to get a Git repository
        1.2 Initializing a Repository in an Existing Directory
        1.3 Cloning an Existing Repository
  3. Recording Changes to the Repository
  4.     2.1 Recording Changes to the Repository
        2.2 Checking the Status of Your Files
        2.3 Adding a new file to your projecty
        2.4 Tracking New Files
        2.5 Staging Modified Files
        2.6 Ignoring Files
        2.7 Viewing Your Staged and Unstaged Changes
        2.8 Committing Your Changes
        2.9 Removing Files
        2.10 Moving Files
  5. Viewing the Commit History
  6.     3.1 Viewing the Commit History
  7. Working with Remotes
  8.     4.1 Working with Remotes
        4.2 Showing Your Remotes
        4.3 Adding Remote Repositories
        4.4 Fetching and Pulling from Your Remotes
        4.5 Pushing to Your Remotes
        4.6 Inspecting a Remote
        4.7 Renaming and Removing Remotes
  9. Branching
  10. Rewriting History
  11. Configuration

0 Getting Started

Git differs from other VCS in that it makes snapshots not differences

Git stores and thinks about information in a very different way than other VCSs.

  • Other version control systems store informations as a set of base files and the changes made to each file over time, this is commonly described as delta-based version control. Instead, Git stores the data as series of snapshots of a filesystem.
  • To store the state of the your project, Git makes a copy, or snapshot, all the files of the project and save them. To be more efficient, if a file has not changed, Git doesn’t store the file again but a link to the already saved file in a previous snapshot.
  • This is an important distinction between Git and all other VCSs, that makes Git more like a mini filesystem. This have many benefits when branching a Git project.

Saturday, March 17, 2018

Introduzione a Git

1. Introduzione

Git e' un sistema di version control (http://git-scm.org). Lo scopo di Git e' quello di tener traccia di tutti i cambiamenti effettuati all'interno di un progetto software in modo da assicurare sempre una versione di backup delle versioni precedenti. In questo modo, se qualcosa va storto, e' possibile invertire le modifiche e ripristinare il precedente stato funzionante del software.
A differenza degli altri sistemi di versionamento, quasi tutte le operazioni in Git non hanno bisogno di una connessione internet, perché sono operazioni che avvengono su disco locale. Git salva lo storico completo del progetto direttamente su disco locale e recuperare una vecchia versione di un file dalla history é una operazione istantanea. Anche le commit avvengono sul database locale

1.1 Git vs GitHub

Git e GitHub sono due cose diverse: GitHub è un servizio online basato su Git, ma non è indispensabile per usare Git e creare un repository. GitHub permette di hostare online un repository creato con Git e condividerlo con altri sviluppatori. L'hosting pubblico su GitHub è gratuito, l'hosting privato è a pagamento. Per questo motivo gli sviluppatori usano altri servizi online per condividere repository Git, come GitLab.com e bitbucket.org.

1.2 Le aree di lavoro di Git

Git e' composto da quattro aree di lavoro:


Il luogo dove lo sviluppatore crea e modifica il codice del progetto e' rappresentato dalla working directory di Git, che contiene i file che andranno a costituire il repository Git.