Se ho n commit, come posso diramare dal commit n-3?
Posso vedere l'hash di ogni commit.
Potete creare il ramo tramite un hash:
git branch branchname <sha1-of-commit>
O usando un riferimento simbolico:
git branch branchname HEAD~3
Per fare il checkout del ramo quando lo si crea, usare
git checkout -b branchname <sha1-of-commit or HEAD~3>
Per fare questo in Eclipse:
Verrà creato un ramo locale per te. Poi ogni volta che spingi le tue modifiche, il tuo ramo sarà spinto sul server remoto.
Sono stato in grado di farlo così:
git branch new_branch_name `git log -n 1 --skip 3 --format=%H`
Dove devi inserire il valore di salto. 0 è l'ultimo, 1 è il precedente, 2 è il commit precedente, ecc.