Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What happens when the connection is lost during a push?

Christopher Mendla April 21, 2018

I have a project that I wanted to move to a new repo. I set the repo up in bitbucket.

I then tried to do a push from the server where the project lives to bitbucket. About 30 minutes in the VPN disconnected.

When I looked at my repo on bitbucket, there weren't any files there.

I would have thought that at least the files that were already pushed would have been there.

The bitbucket repo was master.

The upstream on the app server was set to the bitbucket repo.

I did a simple git push

 

I'd appreciate any help in understanding this

PS - I'm not sure if the git push is still running on the app server or not. I was VPN's into the corporate network and used putty to connect to the app server.

 

thanks

 

Chris

1 answer

1 vote
Brian Wawok April 21, 2018

I think by default git pushes are atomic, they either all go or fail. You can change with a flag

 

https://git-scm.com/docs/git-push#git-push---no-atomic

 

That said.. a git repo should be 100MB or less in size. Is it really taking you an hour+ to push your repo?  You might want to look into git large file storage or something along that line if you are trying to store giant binaries in git.

Christopher Mendla April 21, 2018

Brian,

Thanks.

There were a couple of issues. The first was a bad patch cable to my laptop. I wore a dunce cap for the afternoon after that.

Once I fixed that, the process worked. However, the size is over 1 gb.   I'm going to go through the files to see what needs to be added to the .gitignore. I should be able to get the size down to a reasonable level.

Thanks

 

chris

Brian Wawok April 22, 2018

@Christopher Mendlaremember deleting files out of a git repo will not shrink it, it is still stored in history.  You need to be more fancy and rewrite the repo or something....

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events