Pushing dei branches in remoto

Quando eseguiamo dei branches in locale non sono sincronizzati in remoto. Per condividere con il team un branch eseguiamo il push git push origin testing . Cioè origin è il branch master remoto e testing è quello locale che vogliamo unire. Ora dovreste vedere in remoto una situazione del genere

branch remoto
branch remoto

Se visitate il link dovreste veder il branch master che è quello del progetto su cui state lavorando e il branch testing che contiene le funzioni su cui state lavorando e che avete incluso. Creiamo adesso un brache testing3 git branch testing3. Spostatevi in questo branch ed aggiungete un nuovo file alla cartella del progetto di nome testing3.txt ed inserite del testo. Adesso git add . e poi git commit --m "testing3".

Ora spostiamoci nel branch master e da qui eseguiamo il push in remoto del branch testing3 git push origin testing3. Ora il branch è on line ma non è compreso nel master, e quindi è una copia isolata che possiamo sfruttare per test senza compromettere l’orgine. Per sapere ogni momento in quale branch siamo eseguite questo comando git branch