Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

git checkout firstcommit and then?

 
Ranch Hand
Posts: 600
11
Android Python Open BSD VI Editor Slackware
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
as per subject I cloned a github project then I passed git checkout first commit to study how it is started, because is quite complex
and now via console what can i do to run the version in android studio and go trough the files?

I know there is also an inbuilt GIT but I need to learn from console.
 
Ranch Hand
Posts: 314
2
Android VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

If the project uses Gradle to build the application (and many Git-based Android apps do), open Android Studio and 'Import project (Eclipse ADT, Gradle, etc.)'. Once you tell Studio where the project is located, it should be able to import the project itself. Then you should be able to run the project by pressing the Green Arrow in the toolbar. There's a lot more too it than this, but this should help you get started/

I cant help you with any other scenario, I'm afraid.

Good luck,
Darryl
 
Giovanni Montano
Ranch Hand
Posts: 600
11
Android Python Open BSD VI Editor Slackware
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl A. J. Staflund wrote:Hi there,

If the project uses Gradle to build the application (and many Git-based Android apps do), open Android Studio and 'Import project (Eclipse ADT, Gradle, etc.)'. Once you tell Studio where the project is located, it should be able to import the project itself. Then you should be able to run the project by pressing the Green Arrow in the toolbar. There's a lot more too it than this, but this should help you get started/

I cant help you with any other scenario, I'm afraid.

Good luck,
Darryl


Thank you Darry,
but this is not sufficient. I know how to use Gradle. what I miss is how to launch and navigate in the app classes.IN other words how can I try the first commit of a cloned project
For an android sw developer that work with git should be quite trivial as reply, but I am just beginning with GIT console command line
 
Darryl A. J. Staflund
Ranch Hand
Posts: 314
2
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

I guess I don't understand what you're asking. Git is a revision control system so you're not going to run the code using git from the command line. You can commit or push the code from the command-line, but that's a git task that's better asked in a different forum.

If you are looking to run the application using the Android SDK from the command-line, I've never really done it but documentation on how to use Android SDK's commmand-line utilities are available on the web. You can, however, run the application from within Android Studio by importing the Gradle project and then running it. That really doesn't involve git though.

Good luck.
Darryl
 
Giovanni Montano
Ranch Hand
Posts: 600
11
Android Python Open BSD VI Editor Slackware
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl A. J. Staflund wrote:Hi there,

I guess I don't understand what you're asking. Git is a revision control system so you're not going to run the code using git from the command line. You can commit or push the code from the command-line, but that's a git task that's better asked in a different forum.

If you are looking to run the application using the Android SDK from the command-line, I've never really done it but documentation on how to use Android SDK's commmand-line utilities are available on the web. You can, however, run the application from within Android Studio by importing the Gradle project and then running it. That really doesn't involve git though.

Good luck.
Darryl



Darryl, I found the solution, and you were inspiring to me. It is a kind of grey area cause lot of people use the inbuilt GIT GUI inside intelliJ

here it is.

basically you clone your project
$clone blablabla@github.com
then you see the commits
$ git log

//and you see a list of commits
//then...
$ git checkout <hashcode you found from git log>//in my case the first commit>

then...
you just run the project( the green arrow or shift+f10) and automatically IntelliJ will load the current classes and will load the version you need!

when you are done with your previous commit you can revert to the final commit launching this command

$git checkout master

//and eventually check with git status, that the project is updated for educational purposes, but this step is not needed

so all in all you do not need to import any project, just working out the commands below and then run the project, and you will see the project directory populated with the current classes




 
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic