added git docs
parent
6ad294471f
commit
ba2aad31e9
|
@ -5,3 +5,4 @@
|
|||
* [Oikia](oikia/README.md)
|
||||
* [Caronte](caronte/README.md)
|
||||
* [Network](network/README.md)
|
||||
* [Git](git/README.md)
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
# Using Git with GPG
|
||||
|
||||
## Choose the GPG key you want to use
|
||||
|
||||
List all private keys in my keyring
|
||||
|
||||
gpg --list-secret-keys --keyid-format LONG
|
||||
|
||||
Copy the GPG ID you want to use, in my case is: 1C58C6DAD3D30CCB
|
||||
|
||||
## Generate a pubkey
|
||||
|
||||
gpg --armor --export 1C58C6DAD3D30CCB > gpgpubkey.txt
|
||||
|
||||
## login on git repository
|
||||
|
||||
https://git.unit.macaomilano.org/user/settings/keys
|
||||
|
||||
Upload/paste the entire key
|
||||
|
||||
## Tell Git which key you use
|
||||
|
||||
git config --global user.signingkey 1C58C6DAD3D30CCB
|
||||
|
||||
## Sign your commits
|
||||
|
||||
git commit -S -m "your commit message"
|
|
@ -0,0 +1,90 @@
|
|||
# Semplice guida di partenza all'uso di git
|
||||
|
||||
GIT è un software distribuito di controllo versione
|
||||
|
||||
Uso: crea un archivio locale, clona l'archivio (repositorio) remoto,
|
||||
fai i cambiamenti, segnali (commit) e riportali sull'archivio remoto.
|
||||
|
||||
## Installazione
|
||||
|
||||
con Debian
|
||||
|
||||
sudo apt-get install git
|
||||
|
||||
## Configurazione nome e email
|
||||
|
||||
git config --global user.name "nick"
|
||||
git config --global user.email "email@server"
|
||||
|
||||
### Verifica
|
||||
|
||||
git config --global user.name
|
||||
git config --global user.email
|
||||
|
||||
## Configurazione directory di lavoro
|
||||
|
||||
crea una directory locale
|
||||
|
||||
mkdir ~/git
|
||||
|
||||
spostati nella directory locale
|
||||
|
||||
cd ~/git
|
||||
|
||||
Fai sapere a git che è la directory di lavoro
|
||||
|
||||
git init
|
||||
|
||||
## Checkout (scaricare, clonare) un repositorio (o come dicevan tutti, repo)
|
||||
|
||||
da un repo locale
|
||||
|
||||
git clone /path
|
||||
|
||||
da un repo remoto
|
||||
|
||||
git clone user@host:/path
|
||||
|
||||
## Segna il file "foo" come modificato
|
||||
|
||||
git add foo
|
||||
|
||||
## Commit file (segna come ok i cambiamenti effettuati)
|
||||
|
||||
Fai pure tanti commit ti pare, meglio tanti, piccoli e descrittivi che uno grande.
|
||||
|
||||
git commit -m "descrizione del cambiamento effettuato"
|
||||
|
||||
## Push
|
||||
|
||||
Riporta i cambiamenti sul repositorio remoto
|
||||
|
||||
git push origin master
|
||||
|
||||
## Log
|
||||
|
||||
git log
|
||||
|
||||
## Settaggi utili
|
||||
|
||||
Usa output colorato
|
||||
|
||||
git config color.ui true
|
||||
|
||||
Mostra il log una linea per commit
|
||||
|
||||
git config format.pretty oneline
|
||||
|
||||
Usa l'aggiunta interattiva
|
||||
|
||||
git add -i
|
||||
|
||||
Programma grafico
|
||||
|
||||
gitk
|
||||
|
||||
## Help
|
||||
|
||||
git status
|
||||
|
||||
git help
|
|
@ -0,0 +1,91 @@
|
|||
# Git simple tutorial
|
||||
|
||||
GIT is a source code management and distributed revision control system.
|
||||
|
||||
Use: create a local repo, clone the remote repo, make changes, commit e push back
|
||||
the changes on the remote repo.
|
||||
|
||||
## Installation
|
||||
|
||||
on Debian
|
||||
|
||||
sudo apt-get install git
|
||||
|
||||
## Configure name and email
|
||||
|
||||
git config --global user.name "nick"
|
||||
git config --global user.email "email@server"
|
||||
|
||||
### Verify
|
||||
|
||||
git config --global user.name
|
||||
git config --global user.email
|
||||
|
||||
## Configure working directory
|
||||
|
||||
create local directory
|
||||
|
||||
mkdir ~/git
|
||||
|
||||
move into local git directory
|
||||
|
||||
cd ~/git
|
||||
|
||||
tell Git to use it as a working directory
|
||||
|
||||
git init
|
||||
|
||||
## Checkout (download, clone) a repository (aka repo)
|
||||
|
||||
from a local repo
|
||||
|
||||
git clone /path
|
||||
|
||||
from a remote repo
|
||||
|
||||
git clone user@host:/path
|
||||
|
||||
## Flag the file "foo" as modified
|
||||
|
||||
git add foo
|
||||
|
||||
## Commit file
|
||||
|
||||
Please commit as much as you wants. It is good to have several small commits.
|
||||
|
||||
git commit -m "here goes a comment about the change"
|
||||
|
||||
## Push
|
||||
|
||||
Push the changes on the remote repo
|
||||
|
||||
git push origin master
|
||||
|
||||
## Log
|
||||
|
||||
git log
|
||||
|
||||
## Prettify git
|
||||
|
||||
Use colorful git output
|
||||
|
||||
git config color.ui true
|
||||
|
||||
Show log on just one line per commit
|
||||
|
||||
git config format.pretty oneline
|
||||
|
||||
Use interactive adding
|
||||
|
||||
git add -i
|
||||
|
||||
Use GUI
|
||||
|
||||
gitk
|
||||
|
||||
## Help
|
||||
|
||||
git status
|
||||
|
||||
git help
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
# Usare Git per modificare il website di Unit
|
||||
|
||||
Prerequisiti: setup login e chiave ssh su https://git.unit.macaomilano.org
|
||||
|
||||
* [Git guida di partenza](GitStart-ITA.md) -- Semplice guida a Git
|
||||
|
||||
## Checkout del repositorio del website Unit
|
||||
|
||||
git clone git@git.unit.macaomilano.org:unit/website.git
|
||||
|
||||
## Edita (ad esempio) la pagina index.html
|
||||
|
||||
edit website/index.html
|
||||
|
||||
## Segna il file index.html come modificato
|
||||
|
||||
git add website/index.html
|
||||
|
||||
## Commit
|
||||
|
||||
Fai pure tanti commit ti pare, meglio tanti, piccoli e descrittivi che uno grande.
|
||||
|
||||
git commit -m "descrizione del cambiamento A su index.html"
|
||||
|
||||
git commit -m "descrizione del cambiamento B su index.html"
|
||||
|
||||
## Riporta i cambiamenti sul repositorio remoto
|
||||
|
||||
git push origin master
|
||||
|
||||
## Ora avvisa un umano in IRC del cambiamento in modo che sia approvato
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# Git
|
||||
|
||||
## Table of contents
|
||||
|
||||
* Git stuff
|
||||
* [Git Start](GitStart.md) -- Simple Git tutorial
|
||||
* [Git guida di partenza](GitStart-ITA.md) -- Semplice guida a Git
|
||||
* [Uso di Git per Unit website](GitUnitWebsite.md) -- Usare Git per modificare il website di Unit
|
||||
* [Use Git with GPG](GitGPG.md) -- Use Git with GPG
|
Loading…
Reference in New Issue