So, I'm not too well versed with git. I use it near daily, but I don't know it's workings very well.
At some point our team had to move the domain our GitLab server was using from one to another, and instead of re-cloning the entire repo, I did the logical thing and just updated the origin, with git remote remove origin
, followed with git remote add origin https://domain.extention/projectname.git/
which is what I was informed was the correct step of action.
However, now the git pull and git push commands no longer work without specifying origin develop after them, like
git pull origin develop
git push origin develop
otherwise, it would spit an error like this out at me
fatal: 'develop' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
and every single time I pull, the number of commits it says my branch is head of gets steadily larger, and every single time I push it says it's accumulating yet more and more files, with it taking ever longer to actually push stuff that's as even small as single line changes in singular files.
Doing git remote -v
does properly list the path to the git (same url you would use to clone it in the first place) as both the fetch
and push
urls for origin
.
At this point it says I am hundreds of commits ahead of origin and it takes upwards of 10 minutes to push changes that previous would've taken seconds.
Is there any way to fix this without re-cloning the entire repo? The thing is nearly 40GB at this point (We are using it to store the raw assets, in-dev and ready-to-play builds of a 3D video game - May not be the correct use for git but it has been a lot less of a headache then us trying to use SVN for the same task in the past), and my poor rural internet would take multiple days to clone the entire repo again, even with a shallow clone.