vikram17000
vikram17000

Reputation: 453

New Git branch option in Android Studio disabled

I've been working on an Android Studio project for some time and now want to put it onto a local Git repository. There is no need for a remote repository - I am the only one working on it.

Somehow, after I've added all files to Git from VCS -> Add, I can't get to activate the New Branch option. Anyone else ever seen this issue? Is there a way I can check what is wrong with my project so that I can get all Git functionalities working?

Upvotes: 4

Views: 3197

Answers (3)

LuA
LuA

Reputation: 3

This happened with me also. The branches was not showing in android studio, but with command line was working ok. What I did was simply to register in the settings.

In Android Studio go to:

File>Other settings>default settings>Version control>Git

then you just click in 'add' button, and 'apply' changes.

Upvotes: 0

snydergd
snydergd

Reputation: 564

This happened when I had staged changes but no commits yet (though I thought I had made one).

Once I made a commit through command line the option to create a branch was available.

If you try branching without any commits using the command line, the master branch is gone. Maybe that's why the option is disabled like this.

Upvotes: 3

Shaho Amini
Shaho Amini

Reputation: 400

It is because you don't commit changes in files. After commit changes +new branch option being enable.

Upvotes: 5

Related Questions