Ho un repository con un numero di rami .Tutti i rami sono aggiornati con il ramo remoto equivalente .Quando si esegue lo stato git, il messaggio "il ramo è aggiornato con" origine/diramazione "appare solo alcune volte
Ad esempio vedere l'output di git status e git log per i seguenti due rami:
Branch mantis_0074
[email protected] ~/Documents/BitBucket/electroroute_repositories/gudrun (mantis_0074)
$ git status
On branch mantis_0074
nothing to commit, working directory clean
[email protected] ~/Documents/BitBucket/electroroute_repositories/gudrun (mantis_0074)
$ git log --oneline --decorate
a67b6f7 (HEAD, origin/mantis_0074, mantis_0074) M-0074: Update expected results from sample bids.
afda69c M-0074: Rename long and short term intra-day BritNed auction files to use the correct name format so that they will be processed correctly (i.e. not handled as
bcc41 M-0074: Add unprocessed files which can be used for testing amp_file_transfer.ps1 script.
Branch mantis_0151
[email protected] ~/Documents/BitBucket/electroroute_repositories/gudrun (mantis_0151)
$ git status
On branch mantis_0151
Your branch is up-to-date with 'origin/mantis_0151'.
nothing to commit, working directory clean
[email protected] ~/Documents/BitBucket/electroroute_repositories/gudrun (mantis_0151)
$ git log --oneline --decorate
f0487e2 (HEAD, origin/mantis_0151, mantis_0151) mantis_0151 Finalised version of trigger with updated varaible names etc
24a0ae0 mantis_0151 get the tb_apx_fact_private_trades table trigger into line with what is in production as it currently isn't. Also add the create statement as well
Si può vedere dall'output git log che entrambi i rami siano aggiornati con il ramo a distanza.
Visto che entrambe le filiali sono aggiornate, perché il messaggio Your branch is up-to-date with 'origin/branch'
viene visualizzato solo nel messaggio di stato git del ramo mantis_0151?
Questo ha fatto il trucco. Sono stato in grado di tracciare il ramo remoto usando 'git branch -u origine/ramo '. Quello che non capisco è il motivo per cui alcuni rami sono impostati per tracciare il telecomando e altri no. Fino ad ora non sapevo di tracciare il ramo remoto, quindi non l'ho fatto manualmente in precedenza. – gerard
Per i dettagli su come tenere traccia di un ramo remoto, vedere [Creare un ramo Git esistente per tenere traccia di un ramo remoto?] (Http://stackoverflow.com/questions/520650/make-an-existing-git-branch-track-a- remote-branch) – gerard