-
Notifications
You must be signed in to change notification settings - Fork 38
Setting Up Command Line Environment with Git
Revised : 14 Sep 2019
a. Java SE Development Kit version 11 or higher.
b. Maven version 3.0 or newer. See Mkyong's instructions for installing maven in Windows.
c. GitHub's Git
A. Create a fork out of the current codebase at https://github.com/mars-sim/mars-sim.git. i. Log in github with your userid in your browser. ii. Go to https://github.com/mars-sim/ iii. Click the button "Fork" on the top-right hand corner.
B. Make a copy of the git on your hard drive :
git clone https://github.com/[your_user_name_in_github]/mars-sim.git
git pull origin master
git branch mars-sim
Note: the steps above need to be done only once.
a. From the directory in which you checked out the Mars Simulation Project codebase, go to the "mars-sim" subdirectory.
b. Run the following three commands in one line to compile the classes in all of the maven projects.
`mvn clean kotlin:compile package install`
Note that this will wipe clean the old compiled files, run unit tests on all of the maven projects and generate artifact jar files for them in the local maven repository.
c. Go to the mars-sim-main/target/ directory. You should see the compiled jar called "mars-sim-main-version#-jar-with-dependencies.jar".
d. To start the simulation, just double click this jar to run it.
e. Alternatively, you may want to open a terminal/console(or a command prompt in Windows OS) so that you can see the logging statements. Type the following to start the simulation:
`java -jar mars-sim-main-version#-jar-with-dependencies.jar`
A. If other developers have committed changes recently
i. Get an empty checkout of the branches directory where all of the non-HEAD branches live and making feature branches :
`...`
ii. Update the trunk branch, type :
`...`
iii. To see what files are different from your local checked-out copy of the project and the subversion repository, type:
`git status`
B. If you want to commit changes
i. Get an empty checkout of the branches directory where all of the non-HEAD branches live and making feature branches :
`...`
ii. Add new features and bug fixes
`git add [files I've changed]`
iii. To commit the changes in your local checked-out copy of the project back into the repository, type:
`git commit -m '[message]'`
`git push`