Is there a way to create a repository on Github with an already developed project?

Asked

Viewed 1,298 times

3

My problem is that I have a project on Github and this project is being developed by me and two others. But suddenly, I really don’t know what happened, my project that was all organized, stopped allowing me to commit, push and pull directly from Eclipse. I tried putting it in the repository again, tried cloning it, but git said that part of the project was already on the computer and only allowed me to include the basic classes (which tb. are in my old repository). I don’t know what to do. For this, I use Git for Windows. However, my colleagues have been eating code and even updating code I can’t get the same results. For example, in the GUI, when I run the program, I get results that are different from what is expected (which is what my colleagues get) like screen defacing, it appears in a different way than in Windows Builder.

Therefore, I wanted to create a new repository, but to "start" with code of my project, simply others clone it and start committing there, because it is very complicated, how to proceed?

Como fica, screenshot do meu computador

Como deveria ficar, screenshot do computador do meu amigo

When I try to import the project I downloaded from the other repository from Eclipse using the import > git > Projects from github > existing local Repository > name_repositorio > command goes to the image part. I cannot complete the action (I had already done the repository). But this image appears.

It doesn’t allow you to do the whole project, just the basic classes. Who knows how to help me on this and even better, staying in the same repository, I really appreciate.

  • when you try to commit, git shows an error? @Jnmarcos

  • I didn’t understand the problem @Jnmarcos, it’s not just creating the new repository and making an initial push with the whole project?

  • @Wellingtonsilvaribeiro yes. To do this, follow these steps?

  • @Wellingtonsilvaribeiro yes. To do this, do you follow these steps? 1. create repository on the Github site. 2. clone the repository to the machine and then? Because my project does not present the team options of comitar, push, pull.

1 answer

1


You can add a new origin to your git. For this use the command git add origin remotenovo url-do-seu-novo-repositorio.

Then just commit and push to the new repository:

git push -u remotenovo master

Ready.

  • He says that origin is not part of the command word set. It has to unlock a little more. I do not know how to use through Shell.

  • Ah man, I reversed the command. I’ll adjust here

  • 1

    Actually it is add origin

Browser other questions tagged

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