Git push not working, no error
Asked Answered
P

8

18

I am trying to push my commits to Bitbucket using the command

git push origin master

Nothing happens. I am represented with a command prompt, and no error message. When I browse the source online, my code has not been uploaded.

git remote show

returns "origin"

git push --verbose

Does not show any additional information.

I have pushed many times using this method, but it suddenly just stopped working.

I am using 2.6.1.windows.1 on Windows 10

UPDATE: It appears to a problem with Git itself. I can't push, pull, or clone any repository on both GitHub or Bitbucket. It seems that any git command that connects to a remote isn't working.

I tried uninstalling and reinstalling git. I tried installing both, 2.6.1 and 2.7.0 (2.7 didn't even install properly on Windows 10 Build 14251). I can interact with the repo without an issue on other computers.

Poulos answered 29/1, 2016 at 5:53 Comment(4)
Try git branch -avv to see where your local and remote branch pointers are at. Then use git log <sha1> or git log --graph <sha1> to figure out where these commits are positioned in the history.Cribb
My local branch is ahead by 1 commit. I am the only person working on this project, and there is only one branch.Poulos
I'm having similar issues with bitbucket git as well... Weird, i've pushed 30+ times today. Suddenly it doesn't respond anymore. Straaange.....Banquette
Git push stopped working for me, so I re-installed it, and then all git commands stopped working. I was using git in Cygwin, and the problem was that my Cygwin installation was out-of-date. Everything was fixed after I updated Cygwin.Marcosmarcotte
S
11

I had the same error, push/pull/clone would execute with no errors, no feedback, but nothing happended. What helped was to install latest GIT and when option "Choosing HTTPS transport backend" option came up I have selected "Use the native Winbdows Secure Channel library" and it all worked again ... Hope this help someone.

enter image description here

Spiritoso answered 14/8, 2017 at 9:16 Comment(4)
Thanks a lot. It helped. Else I don't have any way to guess this.Kelvinkelwen
This worked. I had the exact same problem, also with 2.14.1 setup. Thanks for sharing!Wellfixed
This worked for me too. I Installed the newest git version and it worked.Panatella
Worked for me for GitHub. Thanks a lot.Nonpros
D
3

Check if you are in a detached HEAD mode (git symbolic-ref --short -q HEAD is empty), which would explain why a git push fails silently.

If you do have a legitimate branch checked out, then the other test is to make a new clone, import your changes and try to push from that new clone to see if the issue persists.

git clone /url/repo
git remote add work ../previousrepo
git fetch work
git reset --hard work/master
git push -u origin master
Damnatory answered 29/1, 2016 at 6:2 Comment(7)
I am honestly not sure what any of that means, but I typed it in. I got back masterPoulos
@Poulos and git symbolic-ref --short -q HEAD? By the way, I have added links to explain what it means.Damnatory
@Poulos Also, what version of git are you using, on which OS?Damnatory
Thanks for the links. In any case, the command is returning master. I am using 2.6.1.windows.1 on Windows 10Poulos
@Poulos Strange: you are on master, which is ahead by 1 commit... Looks like bitbucket.org/site/master/issues/7397/git-push-not-workingDamnatory
@Poulos Can you try it in a new clone (as I suggested in https://mcmap.net/q/741753/-git-push-and-pull-origin-master-not-working)Damnatory
It does look that issue that you linked to. I will try it in a new clone first thing tomorrow morning and report back. Thanks for your help so far.Poulos
E
1

I had a similar problem with my git pushes and git commits not showing up on Bitbucket.

Problem specifics: My Bitbucket updates had been working fine. I stopped working on the project for a day or two in my environment (Cloud9 in this case). When I resumed, my Cloud9 terminal showed that I was in the correct branch when I typed the command:

git status

However, no changes appeared in my Bitbucket branch.

My solution:

  • Within Bitbucket, click on "Branches" either on the side panel or within the main window.
  • You will see your branches. Click on the branch you're working in your environment, and that you want to push into.
  • Once inside the desired branch, there should be a button in the top right (unless they change the template) called "Checkout." Click on that.
  • Bitbucket provides the following message: Check out this branch on your local machine to begin working on it. It also provides the following code to type or paste into your terminal:

    git fetch && git checkout static-pages
    
  • Run that command in your terminal.

  • This should reset the connection.
  • Try your git push. It should work now.
Erysipelas answered 3/2, 2017 at 20:35 Comment(0)
L
1

This is a open issue in Bitbucket, as @ahmed says. The updated open issue is here.

They recommend power cycling your modem. Alternatively, you can use a different wifi source, which worked for me.

Lycopodium answered 25/4, 2019 at 18:23 Comment(0)
K
0

This is an issue in Bitbucket:

https://bitbucket.org/site/master/issues/7567/git-push-remote-end-hung-up

Edit: i solved the issue by using SSH Tunneling:

% proxychains git push -u origin master  
ProxyChains-3.1 (http://proxychains.sf.net)
|DNS-request| bitbucket.org 
|S-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
|DNS-response| bitbucket.org is 104.192.143.3
|S-chain|-<>-127.0.0.1:1080-<><>-104.192.143.3:22-<><>-OK
Counting objects: 3388, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1089/1089), done.
Writing objects: 100% (3388/3388), 2.79 MiB | 85.00 KiB/s, done.
Total 3388 (delta 2312), reused 3343 (delta 2281)
To [email protected]:username/web-app.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
Keeshakeeshond answered 30/1, 2016 at 12:20 Comment(1)
I can't clone a repo from GitHub either, so I don't think this applies to me. I've updating my original post.Poulos
R
0

Had this issue and resolved it by renaming my branch without symbol '.

I think remote repos doesn't support branch names with ' symbol.

Repast answered 16/12, 2020 at 12:43 Comment(1)
I'm inferring your local branch name previously contained the ' character, which you assume to be the cause of this issue?Spano
S
0

This was my case:

I was using the WSL terminal within VS Code and somehow I tried to git push in several ways but it just didn't work. It worked with git pull, git clone, etc but not with git push.

What worked for me is just to switch from using VS Code to using the WSL terminal directly and it immediately worked.

Stucker answered 18/11, 2021 at 4:10 Comment(0)
N
0

Mine was an issue with Bitbucket and the new app passwords.

Create a password here.

https://bitbucket.org/account/settings/app-passwords/

Update or install git (Not sure if this was even need but adding here anyway)

brew install git

Now open up a new terminal window and try and push it should ask you for a password type in the one you created.

And you should be good to go.

Norris answered 13/3, 2022 at 12:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.