SERVER problem - lost my repository

Asked

Viewed 40 times

0

I ask for help because I don’t know much about GIT and I’m afraid of causing major problems

I had a git repository on a server, whose name was Project.git I controlled it by verse, every branch for every version of my project

Then there was the MASTER, VERSAO_1,2 and 3. At the time in the project folder, it was in the VERSAO3 checkout.

GAVE PROBLEM AND LOST The "project.git" file on my server, being unable to do pushs.

HOW I DO NOW TO CREATE A NEW "GIT PROJECT" on the server, without losing my history of changes?

I do not care to lose the history of branchs, I can take the branch I am (VERSAO3) and make it master. But I have to keep track of changes etc.

If you can help me Gradeco Thank you all.

  • You had given some git clone, git fetch or something like that in your local repository?

  • I gave git clone several months ago, so I only use git push to send the changes to the server. I didn’t give any git fetch no. Only I touch this repository. I believe that at the time of some push the connection fell and then some files got corrupted on the server

1 answer

0

In git you don’t lose anything! If you had this file on the server, and now you don’t have it anymore, someone deleted it, you’re not being able to push it because the repositories are inconsistent!

Some actions you can do:

  1. Search if the file has actually been deleted on the server... If you don’t have an "online" tool to view the repositories, clone the repository and view the history. Then you can undo this commit, and regularize the repository.

  2. You can force the repository rewriting on the server, based on your repository which you consider correct! User a push -force. Doing this you will have to ask the devs to clone the repository again (easiest way).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.