You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The repository has been updated since you last pulled. Try pulling before pushing. #2738
@adamreisnz looking into the work we did around this in #2445 - we should be doing a fetch behind the scenes as per 7ab75c9. So a couple of questions from your logs:
do you see the fetch happen in the log after the push error?
how long does a typical fetch take with this repository?
Normally the fetch would update this button, but maybe we've missed something with this workflow that's different to our background fetch?
@shiftkey I don't recall what machine I did it on anymore so not sure if I can dig up the logs, but a fetch usually doesn't take more than 1-2 seconds for that repo.
@copycatx5 I clicked 'undo' underneath the commit button. Then the push button changed to fetched. So i fetched. Commited again. Then pushed.
Reacted by Dries Pieters, Yifeng Chen, Rizwan, ShijayHuo, Elias Zamaria, Dragis, JonasKru, Albert, Tiernan L, Jeevanjot Singh Vital and 25 more
Reacted by Maxime Pie, Elias Zamaria, Jeevanjot Singh Vital, Omar Errabaany, Ariel Palma, Danaya Davidenko, DuyenNguyen66, Robert Molina, Nisim761, OK and 1 more
Reacted by Jeevanjot Singh Vital, sangesherpa89, Ariel Palma, Danaya Davidenko, DuyenNguyen66, Robert Molina, OK and Nisim761
You can go to Repository -> Pull and then click on Push Origin.
Reacted by Maor Azoulay, Oleksandr Sokolovskyi, Dan Gowans, Daniel Byland, Morten Kjær Nicolaysen, Caner Elci, fuyuanhao, Adam Tester, Flávio Mourão and hyq
Reacted by Markus Seyfferth, Daniel Byland and Caner Elci
Dropping in to add some clarity to the reproduction steps and paste my logs.
Commit some stuff to a repo on Desktop
go to the same repo on Github.com and add a new file
click Push origin on Desktop
Logs:
install.ts:23 git -c credential.helper= push origin master:master --progress exited with an unexpected code: 1.
To https://github.com/tierninho/AAAAAAAA.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/tierninho/AAAAAAAA.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
(The error was parsed as 10: The repository has been updated since you last pulled. Try pulling before pushing.)
Ideally, the button should look like this if a fetch was performed in the background:
For now, the workaround is still: #2738 (comment) but adding help-wanted if anyone wants to work on this!
Bumping this issue to indicate I think I've uncovered the root cause of this flow:
Now I'm left with only the push option, which doesn't work, so I have to hunt in the menu to find a pull command or use command line.
Actually, now after about 40 seconds, it changed to "Pull origin" by itself. Guess there might be something wrong with the update of it.
This feels a lot like something that #6610 will address, and the changes over there should address this so you get immediate feedback after the fetch (and we can change the button label to be Fetch rather than Close).
Activity
joshaber commentedon Sep 15, 2017
Agreed, changing the button to be a great improvement 👍
shiftkey commentedon Sep 18, 2017
Sounds like we were waiting on a fetch to happen to update the button state.
shiftkey commentedon Sep 18, 2017
@adamreisnz looking into the work we did around this in #2445 - we should be doing a fetch behind the scenes as per 7ab75c9. So a couple of questions from your logs:
fetchhappen in the log after the push error?Normally the fetch would update this button, but maybe we've missed something with this workflow that's different to our background fetch?
adamreisnz commentedon Sep 18, 2017
@shiftkey I don't recall what machine I did it on anymore so not sure if I can dig up the logs, but a fetch usually doesn't take more than 1-2 seconds for that repo.
shiftkey commentedon Sep 18, 2017
@adamreisnz no problem - it should be easy to reproduce, just a bit time-consuming...
CruiseMan commentedon Mar 30, 2018
@joshaber Do you know ETA for this one ?
solocatz commentedon Aug 27, 2018
It happens again, is there a solution?

newdawnguitar commentedon Aug 28, 2018
@copycatx5 I clicked 'undo' underneath the commit button. Then the push button changed to fetched. So i fetched. Commited again. Then pushed.
MaximePie commentedon Aug 30, 2018
Clicking 'Undo', fetching, pulling, and commit again worked for me, thanks @newdawnguitar !
acerock6 commentedon Sep 7, 2018
You can go to Repository -> Pull and then click on Push Origin.
indysigner commentedon Oct 23, 2018
On year in, this problem still hasn't been fixed 🙄
tierninho commentedon Oct 23, 2018
Dropping in to add some clarity to the reproduction steps and paste my logs.
Push originon DesktopLogs:
Ideally, the button should look like this if a fetch was performed in the background:

For now, the workaround is still: #2738 (comment) but adding
help-wantedif anyone wants to work on this!yalnjooj commentedon Jan 3, 2019
shguocc commentedon Jan 14, 2019
shiftkey commentedon Jan 14, 2019
Bumping this issue to indicate I think I've uncovered the root cause of this flow:
This feels a lot like something that #6610 will address, and the changes over there should address this so you get immediate feedback after the fetch (and we can change the button label to be
Fetchrather thanClose).CQHofsns commentedon Jan 31, 2019
You have saved my day, Thank you so much !!! 💯
MappingSteve commentedon Feb 24, 2019
Because this just happened to me, repeating here the work-around for anyone who gets here before the fix rolls out:
In menu, "Repository > Pull" gets you unstuck.
nguyendptse62666 commentedon Feb 27, 2019