Cannot see any git branches
I cloned a repo from Github. It was an eclipse Android project. I then imported it into Android Studio and have now got it up and running. I ran "git init" and am now trying to create a branch to work off of. when I run git branch I get nothing. Terminal returns nothing and just goes to the next line. i have tried running git branch -a and git branch --list and still am getting nothing. There is no master branch showing or any branch for that matter. I ran git checkout -b and it said the branch was created. But when I run git branch I still get nothing returned. I then tried to run git checkout master and received: git checkout master error: pathspec 'master' did not match any file(s) known to git. I am not sure why this is happening and think it has something to do with the weird initial setup. (clone repo, then import into android studio, then run git init)
git init is for initializing a new git repository. Since you cloned from an existing repository on Github, there is no need to initialize a new one. In general, if you git init to initialize a new repo, and then immediately invoke git branch without making any commits or creating any branches, then the behavior you experienced is expected: git branch will return nothing. Only after your initial commit (or you explicitly create a branch) will you see any branches listed. In particular if you ran your git init and git clone in the same directory where you ran git clone to begin with, then you will not see any branches. If you change directory into the subdirectory that was created when you cloned, then git branch will probably list master for you (and git remote show origin will show you the remote branches).
Programmatically how to create Video in android
Separate favicon and android homescreen icon
Data loss while reading from Blackberry device file containing data sent from an accessory using the AOA protocol
Android - how to add a badge count to an application icon?
Android percentage bar with info popup
Upload sensor data from Android device to remote host
Manage who can see the feedback from other users on the google play store app page
SQLite NOT LIKE statement in android
How to launch the PlatLogoActivity
Why Can not I inflate a layout?
changes to be made to use new adt bundle over the previous version
How to put models (not strings) into spinner
Android edittext style to show vertical divider
Displaying a notification from a wearable app
GCM IntentService how to display a pop up on notification receive
2 Spinner with different style in same project