android


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).

Related Links

Android fragment change orientation and NullPointerException
how to set my google Map app to be show my current location as default? [duplicate]
Some buttons not showing up on RelativeLayout in Android
Cannot load Fragments from Navigation Drawer items
Disabled EditText element display keyboard
Frame animation not working
Push notification not working in Amazon SNS
Android Segmentation fault Tombstone debug 6.0.1, 6.0.0
How to compare screenshots to a reference image using appium
ADB No Device Found Android
HeadsUp Notification not displayed on KitKat
Chromcast. CastRemoteDisplayLocalService doesn't call onCreatePresentation
AndEngine continues move straight through the first touch (TouchEvent , onModifierFinished)
JUnit not working on IntelliJ Android project
GLSurfaceView is not appearing until orientation change
ADB - Getting string from the device using adb shell has unexpected and weird behavior

Categories

HOME
phantom-dsl
linkedin
jmeter
zend-framework
numbers
interface
error-handling
gradient
jetty
settings
frontend
title
extjs4.2
categorical-data
opengl-es-3.0
tput
frequency-distribution
symbol
entitymanager
soci
asp.net-core-webapi
drive
ag
react-toolbox
dapper-extensions
appirater
winpe
alm
powershell-ise
sql-server-2000
kodi
laravel-eloquent
simplecv
android-sugarorm
hunspell
jwplayer6
apiary.io
watchman
sim-card
odroid
setup.py
magento-1.9.3
stringtokenizer
dcmtk
smoothstate.js
apollostack
placeholder
xmldocument
flask-login
httrack
lampp
modelsim
colorbar
excel-dna
bbpress
gameplay-kit
ampps
choice
mta
pushbots
themoviedb-api
xenomai
roadkill-wiki
xvim
coda
mod-proxy
dulwich
graphics2d
rrule
cross-join
iiop
crowd
nsmenu
verold
jjaql
sbcl
gwt-openlayers
hibernate-entitymanager
artemis
video-codecs
stacky
midlet
fragmenttransaction
cuda-gdb
box2d-iphone
massive
squishit
updatesourcetrigger
wysiwym
sqlobject
dsoframer
change-management
pnrp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App