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.

Dave
  • 3,676
  • 4
  • 28
  • 39
  • Try `git branch -avv` to see where your local and remote branch pointers are at. Then use `git log ` or `git log --graph ` to figure out where these commits are positioned in the history. – Nayuki Jan 29 '16 at 05:55
  • My local branch is ahead by 1 commit. I am the only person working on this project, and there is only one branch. – Dave Jan 29 '16 at 05:59
  • I'm having similar issues with bitbucket git as well... Weird, i've pushed 30+ times today. Suddenly it doesn't respond anymore. Straaange..... – Rob Oct 17 '16 at 14:52
  • 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. – holdenlee Apr 28 '20 at 14:09

8 Answers8

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

vidriduch
  • 4,753
  • 8
  • 41
  • 63
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
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I am honestly not sure what any of that means, but I typed it in. I got back `master` – Dave Jan 29 '16 at 06:05
  • @Dave and `git symbolic-ref --short -q HEAD`? By the way, I have added links to explain what it means. – VonC Jan 29 '16 at 06:05
  • @Dave Also, what version of git are you using, on which OS? – VonC Jan 29 '16 at 06:06
  • Thanks for the links. In any case, the command is returning `master`. I am using `2.6.1.windows.1` on Windows 10 – Dave Jan 29 '16 at 06:08
  • @Dave Strange: you are on master, which is ahead by 1 commit... Looks like https://bitbucket.org/site/master/issues/7397/git-push-not-working – VonC Jan 29 '16 at 06:12
  • @Dave Can you try it in a new clone (as I suggested in http://stackoverflow.com/a/14435169/6309) – VonC Jan 29 '16 at 06:13
  • 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. – Dave Jan 29 '16 at 06:17
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.
Siggytron
  • 93
  • 3
  • 12
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.

theresawalrus
  • 347
  • 2
  • 19
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 git@bitbucket.org:username/web-app.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
ahmed
  • 5,430
  • 1
  • 20
  • 36
  • I can't clone a repo from GitHub either, so I don't think this applies to me. I've updating my original post. – Dave Jan 30 '16 at 16:24
0

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

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

InDieTasten
  • 2,092
  • 1
  • 16
  • 24
Nurai
  • 1
  • I'm inferring your local branch name previously contained the `'` character, which you assume to be the cause of this issue? – InDieTasten Dec 16 '20 at 14:00
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.

Benjamin Zach
  • 1,452
  • 2
  • 18
  • 38
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.

user1503606
  • 3,872
  • 13
  • 44
  • 78