Files
git-cheatsheet-ita/README.md
T
2025-12-05 09:46:46 +01:00

32 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- File: 00-introduzione-git.md -->
# git-cheatsheet
Usiamo **Git** come sistema di versionamento distribuito.
Chi arriva da **Subversion (SVN)** deve tenere a mente alcune differenze chiave:
- In Git hai **sempre una copia completa del repository in locale**
- Le modifiche passano da tre "stati":
1. **Working directory** i file sul tuo disco
2. **Staging area (index)** le modifiche pronte per il commit (`git add`)
3. **Repository locale** la storia ufficiale sul tuo PC (`git commit`)
- Il server remoto (es. GitHub/GitLab/Bitbucket) è solo un altro **remote** (di solito `origin`)
### Mappa mentale SVN → Git
- `svn checkout URL``git clone URL`
- `svn status``git status`
- `svn diff``git diff`
- `svn add file``git add file`
- `svn commit`**NON** manda al server: in Git il `commit` è locale
- `svn update``git pull` (o meglio: `git fetch` + `git merge`)
- `svn commit` + sync → in Git è `git commit` + `git push`
Nei file seguenti (directory [**docs**](./docs)) vedremo:
1. Configurazione utente (`git config`)
2. Workflow base di lavoro (clone, commit, push)
3. Differenza tra `fetch`, `merge` e `pull`
4. Accenno al **Driessen branching model** (Git Flow)