0

I originally developed an app using Android Studio on my desktop computer. I had my github account hooked up and was committing updates through Android Studio. I had to go on a trip last week and had a new laptop which I installed Android Studio on. However, instead of cloning the repository I simply downloaded a zip of the project and worked on it outside of git.

Now I would like to take the version on my laptop and replace the remote repository on my github with that copy.

Any way I can do that through Android Studio on my laptop with the updated version?

sbearben
  • 323
  • 6
  • 16
  • I think that simply copying the files from laptop to desktop is far enough: You can commit the changes since Git detects it and push it to GitHub. – bimlas Jun 01 '18 at 05:46
  • Note: Of course you don't need to copy Android Studio files, but the source files only. – bimlas Jun 01 '18 at 05:49
  • Possible duplicate of [How do I clone into a non-empty directory?](https://stackoverflow.com/questions/2411031/how-do-i-clone-into-a-non-empty-directory) – phd Jun 01 '18 at 07:17

1 Answers1

1

You start by making your working copy a regular working copy by

  1. making a temporary clone of your existing repository
  2. copy the .git folder from this fresh clone into your working directory
  3. (optional) git checkout -b new-branch-name
  4. git add/rm
  5. git commit
  6. git push
Rudi
  • 19,366
  • 3
  • 55
  • 77