Sono nuovo di git, e non riesco a dare un senso al seguente comportamento:'Il vostro ramo è più avanti di 'origin/master' da 1 commettere' sulla spinta esplicito
Ho un repo bitbucket che Io clone localmente, quindi modifico e eseguo il commit localmente, quindi spingo al repository remoto. Se faccio un push implicito, o 'push origin', non c'è problema. Se spingo usando l'URL remoto esplicito, ottengo il messaggio di stato "Il tuo ramo è più avanti di" origine/master "di 1 commit".
Sembra che git non riconosca l'indirizzo esplicito come uguale all'origine, quindi cosa sta succedendo esattamente. Se faccio un'altra spinta implicita, non fa nulla, ma cancella il messaggio.
Ecco un esempio di sessione:
[email protected]:/more/coding/git-tests/ask1$ git --version
git version 1.7.2.5
[email protected]:/more/coding/git-tests$ git clone https://[email protected]/shishani/dirasi.git ask1
Cloning into ask1...
Password:
remote: Counting objects: 24054, done.
remote: Compressing objects: 100% (6300/6300), done.
remote: Total 24054 (delta 17124), reused 24024 (delta 17106)
Receiving objects: 100% (24054/24054), 11.83 MiB | 251 KiB/s, done.
Resolving deltas: 100% (17124/17124), done.
[email protected]:/more/coding/git-tests$ cd ask1
[email protected]:/more/coding/git-tests/ask1$ jed setup.py
[email protected]:/more/coding/git-tests/ask1$ git commit -a
[master a053f28] modified: setup.py
1 files changed, 1 insertions(+), 0 deletions(-)
[email protected]:/more/coding/git-tests/ask1$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)
[email protected]:/more/coding/git-tests/ask1$ git remote show origin
Password:
* remote origin
Fetch URL: https://[email protected]/shishani/dirasi.git
Push URL: https://[email protected]/shishani/dirasi.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (fast-forwardable)
[email protected]:/more/coding/git-tests/ask1$ git push
Password:
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 314 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: bb/acl: shishani is allowed. accepted payload.
To https://[email protected]/shishani/dirasi.git
5e9ffd1..a053f28 master -> master
[email protected]:/more/coding/git-tests/ask1$ git status
# On branch master
nothing to commit (working directory clean)
[email protected]:/more/coding/git-tests/ask1$ jed setup.py
[email protected]:/more/coding/git-tests/ask1$ git commit -a
[master 6d0e236] modified: setup.py
1 files changed, 1 insertions(+), 0 deletions(-)
[email protected]:/more/coding/git-tests/ask1$ git push https://[email protected]/shishani/dirasi.git master
Password:
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 298 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: bb/acl: shishani is allowed. accepted payload.
To https://[email protected]/shishani/dirasi.git
a053f28..6d0e236 master -> master
[email protected]:/more/coding/git-tests/ask1$ git status
# On branch master
**# Your branch is ahead of 'origin/master' by 1 commit.** <-- this does not reflect current state
#
nothing to commit (working directory clean)
[email protected]:/more/coding/git-tests/ask1$ git push
Password:
Everything up-to-date
[email protected]:/more/coding/git-tests/ask1$ git status
# On branch master
nothing to commit (working directory clean)
Questa domanda è stata probabilmente chiusa in modo errato come duplicato della domanda sbagliata. Non appena avrò finito di ottenere un dupe hammer per Git, inizierò a riaprire e chiudere correttamente domande come questa come duplicati di [altro Il tuo ramo è più avanti delle domande 'origine/master'] (https://www.google .com/search? q = Il vostro ramo + + è + avanti + di +% 27origin% 2Fmaster% 27). –