'`git push` -- No output, nothing happens

touch test
git add test
git commit -m "test"
git push -u origin master

This worked. The file was uploaded to the repository.

rm test
cp -R ../website ./website
git rm test
git add website/
git commit -m "Initial"
git push -u origin master

This did not give any output, and nothing seems to have bee done to the repository. The test file is still present in the repository.

$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

Can anyone assist?


Recreated the branch on both client and server, to no succes. It works when there's just one file inside, but it will simply not push the website folder to the server.

This is the only strange thing I can see; POST git-receive-pack (chunked)



Solution 1:[1]

This does not look like a git error to me. If you are using exactly the commands you have shown, the contents of the ../website directory will not be copied to the ./website directory. Try doing a cp -R ../website ./website to copy all the contents.

Also, try doing a git status after copying to see if the changes reflect. Try adding everything in the repository directory to the git repo by doing git add .

Let me know the results of this operation. Also, I would appreciate it if you can update the question with your directory structure.

Solution 2:[2]

Simply try git push, you don't need to specify arguments, as you already used -u option once. Also from your output it seems that Bitbucket server could be down at that moment.

Solution 3:[3]

One common cause of this is if you enter the wrong passphrase for your SSH key. Until you clear the cached credentials, git push will never work with that remote.

The command line git push origin master will do nothing, stalled, and produce no output.

SmartGit can 'cause' this by auto-filling the wrong password for your SSH key during the push. Clicking OK permanently breaks 'git push' until you go into Preferences and clear that credential out.

Solution 4:[4]

If you use persistent SSH connections, a stale connection could be the issue. It happened to me the first time today after a year of using persistent SSH. Open your .ssh/config and check the ControlPath, then go there and remove the corresponding file. For me it was /tmp/[email protected]:22

Solution 5:[5]

Generally, if your commit size is bigger than expected then you get chunked. You can see push output details by adding --verbose after push command.

Command below will fix the issue. It is the quickest way.

git config http.postBuffer 524288000

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 automaticAllDramatic
Solution 2 Anton Guryanov
Solution 3 Lilith River
Solution 4 Maciej Swic
Solution 5 Burk