CodyBugstein
CodyBugstein

Reputation: 23362

Android Studio VCS won't push my new branch to Git

In my Android Studio project, I had one branch called myproj.

I've been updating and committing to it for a few days. I decided I wanted to work on a new feature and I'm not sure where it will take me so I created a new branch.

When I committed and pushed my new changes however, it seems to have only committed it locally but didn't push it. When I go to my Git repository it still says I have one branch.

How do I push this new branch to Git?

Upvotes: 6

Views: 4539

Answers (2)

devprashant
devprashant

Reputation: 1293

(Used this approach to push branches to GITHUB. Hope this works same on others repo and private hostings as well.)

I opened git in terminal and typed:

git push --all

Then:

Press Enter.

Enter credentials.

Done.

Upvotes: 0

Anjaneyulu Battula
Anjaneyulu Battula

Reputation: 1960

You can push the branch in terminal (command prompt) by using following command

  • git push origin yourbranchname

    origin - your remote URL

    yourbranchname - the branch which you want to push

Upvotes: 5

Related Questions