0

I had a local project (where I indeed did 1-2 commits before adding the repository) and a repository that included a README

I've tried around a little and got the following log atm.:

project>git log
commit &The last commit I made& (HEAD -> master)
Author: %me%
Date:   Sat Dec 22 18:42:40 2018 +0100

    Test

commit %Another commit I did locally before the repo was added%
Merge: 7fcbc93 8f12e9a
Author: %me%
Date:   Sat Dec 22 18:39:43 2018 +0100

    Merge branch 'master' of https://devops.hud.de/bitbucket/scm/pvtdevint/projektverfolgung

commit %A commmit I did before adding the repo%
Author: %me%
Date:   Sat Dec 22 18:23:18 2018 +0100

    Initial commit

commit %first commit (was in repo)% (origin/master, origin/develop, origin/TestBranchDevelop)
Author: %sb else%
Date:   Wed Nov 28 14:53:01 2018 +0100

    initial commit

I tried git show-ref:

%my latest commit% refs/heads/master
%commit #sb_else% refs/remotes/origin/TestBranchDevelop
%commit #sb_else% refs/remotes/origin/develop
%commit #sb_else% refs/remotes/origin/master

So it looks like my upstream might be wrong, so I tried to check it:

>git branch -v
* master d24f144 Test      //<- %my latest commit%

So I tried to push again:

>git push --set-upstream origin HEAD:TestBranchDevelop
Enumerating objects: 215, done.
Counting objects: 100% (215/215), done.
Delta compression using up to 8 threads
Compressing objects: 100% (201/201), done.
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
fatal: the remote end hung up unexpectedly 233.00 KiB/s
Writing objects: 100% (214/214), 1.64 MiB | 301.00 KiB/s, done.
Total 214 (delta 36), reused 0 (delta 0)
fatal: the remote end hung up unexpectedly
Everything up-to-date

What did I do to import that repository:

>git add .
>git commit -m "initial commit"
>git remote add origin %my_url%
>git pull origin master --allow-unrelated-histories

Now some Posts on SO say, that you should try to change your repository-url from https to http, sadly my repo can only be accessed via https (so that's not an option). Now how can I fix this?

Rüdiger
  • 893
  • 5
  • 27
  • 56
  • Possible duplicate of [Github Push Error: RPC failed; result=22, HTTP code = 413](https://stackoverflow.com/questions/7489813/github-push-error-rpc-failed-result-22-http-code-413) – Evert Dec 22 '18 at 18:06

1 Answers1

2

It looks like your server is rejecting HTTP requests that are too large, and git is attempting to do a HTTP request that exceeds this size. Your only sane recourse is to configure your server better to allow larger HTTP requests.

Evert
  • 93,428
  • 18
  • 118
  • 189
  • Since it's in a corporate environment that's not possible for me. But it should work if I start deploying in little increments, right? Can I somehow set my head back to the state where the other branches are to be able to readd the changes without removing any data from my directory? – Rüdiger Dec 22 '18 at 18:22
  • `git push origin HEAD~1000:refs/heads/master && git push origin HEAD~500:refs/heads/master && git push origin master` (the last one to update local `origin/master`). – phd Dec 22 '18 at 22:23