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

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

Categories

HOME
batch-file
uml
ecmascript-6
android-studio-2.2
solver
javacc
alsa
permissions
zip
pearson-correlation
tvos
code-coverage
nstableheaderview
owin
dkim
startup
nancy
onedrive-api
qsqlquery
docx
job-scheduling
easyphp
google-content-api
video-editing
sse
cfml
nodemcu
swagger-2.0
apache2.4
drive
visual-glitch
dpdk
question2answer
ember-cli
react-toolbox
object-storage
fable-f#
asymptotic-complexity
android-things
user-defined-functions
database-comparison
hibernate-validator
jett
gojs
keras-layer
reverse
sql-server-ce
jpad
node-mssql
resolution
android-ibeacon
http-request
plan-9
xbmc
term
openrasta
clarifai
sonarlint-eclipse
dotnet-httpclient
x-ray
edit
cup
bbpress
cpu-cache
trigger.io
materialized-path-pattern
angular2-testing
flex-monkey
centrifuge
dotnetnuke-7
uicolor
model-associations
tooleap
delta
jclouds
data-protection
cda
user-management
crouton-os
asyncdisplaykit
libvlc
dynatree
ess
iced-coffeescript
eoferror
uncompress
vacuum
branch-and-bound
user-permissions
fits
qtwebengine
rapidsvn
webmatrix-3
genymotion-call
trdion2011
xml-namespaces
authlogic
ecslidingviewcontroller
rfc5322
spring-3
sphinxql
mysql-error-1044
fb.ui
apache-abdera
sqlclr
intersect
faye
azman
webdev.webserver
uipagecontrol
cdonts
metaweblog
facebook-iframe
wspbuilder

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