using the terminal for github projects in android studio

juztcode :

Android studio does come with a git client but I kind of don't like the idea of providing and storing the email ID and password in an IDE, I'd rather perform stuffs via the terminal, but, the android studio is structured like this:

enter image description here

But, say I saved the (above) android studio project in the ~/Desktop/torlent folder, then wouldn't I have to git init in that same folder? But that folder wouldn't contain these External Libraries or the Scratches and Consoles directories(I suppose they are necessary for proper functioning of the app, although I have no idea) which should perhaps be committed/pushed?

So, what is the proper way to setup git for an android studio project via a terminal?

Pavneet_Singh :

I saved the (above) android studio project in the ~/Desktop/torlent folder, then wouldn't I have to git init in that same folder?

If that folder torlent is already a git repo then you don't have to execute git init as it has been done already.

But that folder wouldn't contain these External Libraries or the Scratches and Consoles directories(I suppose they are necessary for proper functioning of the app, although I have no idea) which should perhaps be committed/pushed?

Yes, It won't contain these external libraries and Scratches and Consoles directories as external libraries: These libs are downloaded and linked from SDK so they are quite bulky and should not be a part of the project due to size which will delay upload and download further more it can be a security threat when the libs are private(paid repositories etc)

Scratches and Consoles: These are temporary files and stored under the android studio config folder and the purpose is to share these files across projects. If you want the local file then you can create new directories and files under your repo.

what is the proper way to setup git for an android studio project via a terminal

Follow the steps to setup git repo

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=33047&siteId=1