1

I'm trying to use git lfs because my mobile app codes are too big to upload on github. For some reason, git lfs doesn't work. Therefore, I'm trying to initialize git by typing "git init". However git init doesn't work.

How can I initialize git in Android Studio?

황희윤
  • 441
  • 6
  • 14
  • 1
    What *precisely* does "doesn't work" actually *mean?* (See [ask] and [mre]) – torek Jun 11 '22 at 04:17
  • I got the message that the git init successfully worked, but git lfs didn't work and the git log remains the same. All of the commits that I made was not removed from git. That's why I think the git init didn't work – 황희윤 Jun 11 '22 at 04:32
  • 2
    So, what sequence of commands do you have as a [mre]? (And: `git init` should never *remove* any commits. It either creates a new empty repository, where there was no repository before, or "reinitializes" an existing repository, which normally has no effect whatsoever.) – torek Jun 11 '22 at 04:34
  • Oh I didn't know that the git init doesn't remove any commits and also reinitializes an existing repo has no effect at all. So if I want to use git lfs in existing repo, then I need to make new repo because I can't use git lfs in the existing repo, right? – 황희윤 Jun 11 '22 at 04:43
  • 1
    You can turn an ordinary (non-LFS) repo into an LFS repo using `git lfs migrate`, but be careful with it. See [How to migrate to git lfs](https://stackoverflow.com/q/61816770/1256452) and [What does git lfs migrate do?](https://stackoverflow.com/q/51782043/1256452) for some examples. I don't know how well any of the Android ecosystem integrates with Git-LFS. – torek Jun 11 '22 at 05:10
  • I used my backup files which copied every codes of my mobile app and I removed all of git and restarted it. I don't know it's right or not, but it seems working well. Thank you so much for your help! Even though I made new github repository, but I really appreciate your help :) – 황희윤 Jun 11 '22 at 05:26

0 Answers0