Trying to use Git with Android Studio -
with friend long time trying work git , android studio, had problem (we new git , android studio, started couple of days ago on both issues).
what happens that, example, if cloned git repository , try make merge, button execute grayed out , doesn't let me compile or run it, if display project structure android or packages see nothing, can see files in project, project files, recent changes, etc...
i explain in detail we've done.
first, repository looks (p , c initials).
x (c) / x (master) \ x (p)
master has first initial commit .gitignore , readme.md, nothing more, while (me created branch p, , friend created branc c) have 1 commit each 1 executable projects, although i'm not interested in joining i've done friend has done, want start new project of android studio friend has made.
so start android studio, "check out project version control -> github", put key , choose repository want clone, after ask me if want create new project , click yes.
i hit next until new project created , here can see branches have created on github.
after make local branch try work project of friend, option "git branches -> new branch" , calling p, moves me local branch automatically.
after that, choose merge option of remote branch origin/c, , merge failure, says "some untracked working tree files overwritten merge. please move or remove them before can merge.", choose option view files , shows me these.
since project new, , project friend uploaded worked fine him, deleted these files red bar mouse pointing , after message appears says there no difference now.
finally, after that, go again merge option of remote branch c, , conflict message appears, on .gitignore file, in case put "accept theirs", , see message merge correctly.
and when see button execute grayed , if display project structure android see nothing, can see files in project, project files, etc...
i think should super basic i'm asking, (me , friend) had never worked git or android studio , asked make project using them.
this because have added .idea folder in git repository.sample .gitignore file can this
build/ .gradle/ *.iml .idea/ src/main/gen/* *~ *.swp local.properties *.keystore *.keystore.password
also need delete folder git repo. can use below command
git rm -rf .idea/ git commit -m "deleting .idea, updated .gitignore"
then try merge
Comments
Post a Comment