Congratulazioni

Git intermedio

George Boorman

Curriculum Manager, DataCamp

Branch

Immagine dei branch bug-fix, ai-assistant e main con commit e merge

Git intermedio

Lavorare con i branch

  • Vedi tutti i branch
git branch
  • Passa a un branch esistente
git switch hotfix
  • Crea e passa a un nuovo branch
git switch -c hotfix
  • Confronta due branch
git diff main hotfix
  • Rinomina un branch
git branch -m hotfix bugfix
  • Elimina un branch
git branch -d hotfix
Git intermedio

Unire branch

  • Da main, per unire ai-assistant in main:
git merge ai-assistant
  • Da un altro branch: git merge sorgente destinazione
git merge ai-assistant main
  • Gestire i conflitti di merge
Git intermedio

Lavorare con i remoti

  • Clona un repo remoto
git clone https://github.com/datacamp/project
  • Info su tutti i remoti
git remote -v
  • Aggiungi un nuovo remoto
git remote add george https://github.com/george_datacamp/repo 
Git intermedio

Sincronizzare repo locali e remoti

git fetch origin
git pull origin
git push origin documentation
Git intermedio

E ora?

Git intermedio

Ayo berlatih!

Git intermedio

Preparing Video For Download...