0

I've GitHub repository in my IIB10 toolkit using EGit plugin.
I used to work with that repository.

I took workspace project interchange(PI) backup, later some changes my project has crashed.
So, I just imported my project from the PI backup and it got disconnected from GitHub.

I am using the same project in the different workspace, there also this project has deleted.
Now I have that project in the local workspace(not local git). How can I resolve this one? Please help me out.

1 Answers1

0

If your workspace has no .git subfolder, you should at least:

  • clone your original GitHub repository
  • import your restored backup back to the new local clone

That is:

cd /path/to/restored/repo
cd ..
git clone https://github.com/<me>/<myrepo>
cd myrepo
git --work-tree=../repo add .
git commit -m "import from backup"
git push
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you, can I clone github repository into existing local folder(where .git exist)? Does will overwrite my changes in local git right? – Somasundaram Jul 16 '20 at 07:59
  • @Somasundaram No, it is preferable to clone it to a new folder (or to rename your existing folder) – VonC Jul 16 '20 at 08:02
  • If I am fetching(updating) from Remote Origin, Can I get that local git missing project from the remote repository? Thal local missing project(application) has link with many other applications. I'm not able to build those applications since that application is missing. – Somasundaram Jul 16 '20 at 08:37
  • My local directory has that .git folder and available all other applications, only missing this particular application. If I am fetching(updating) from Remote Origin, Can I get that missing application in local git? – Somasundaram Jul 16 '20 at 08:52
  • @Somasundaram Then, after a new clone, can you copy that one application back into your folder? – VonC Jul 16 '20 at 13:04
  • I think you have a directory that is not a Git repo. This might be helpful: https://stackoverflow.com/questions/3311774/how-to-convert-existing-non-empty-directory-into-a-git-working-directory-and-pus – kimbert Jul 23 '20 at 12:01