-
Notifications
You must be signed in to change notification settings - Fork 5
Gitting started on a new desktop
Because every desktop at the school is not guaranteed to have a copy of the code we are working on you might need to initialize your workspace before you can start start working.
What the instructions below go over is how to clone our github repository, and then how to commit changes to that project.
You will need to do this when you cannot find the robot code that we are working on when you start up eclipse.
-
Open Eclipse and switch to the Git perspective
To do so go to Window -> Open Perspective -> Other -> then Select Git -
Clone the remote repository
To do so go to the Git Repository view and click on the second small icon from left to right at the top of the section. When you hover over it the tooltip is "Clone a Git Repository ..." -
Enter the following information into the URI text box. If the host, repository path, and protocol does not fill in use the below settings
URI: https://github.com/CraftSpider/Stronghold2016-340.git
Host: github.com
Repository path: /CraftSpider/Stronghold2016-340.git
Protocol: https
User: your github username
Password: your github password
DO NOT CHECK THE STORE IN SECURE STORE BOX
-
After you click next make sure that master is selected from the list of branches then click next.
-
In the next window make sure that "Import all existing eclipse projects after clone finished" is selected. Then click finish.
-
Switch back to the Java perspective in the same way in step 1
When you make changes to the code on your local machine you it will only exist on your own computer. So no one else will be able to see your changes and you will not be able to test your code on the robot. You will need to commit your code, check that no one else changed the same files that you did, and then push your changes to github.
-
You will know that you have uncommitted changes because the file will have a ">" next to the file name in the package browser.
-
To commit your changes right click on the project then go to Team -> Commit... then enter your name and email like this: firstname.first initial of last name ex) john.l and then for your email make a fake email address using that name by adding @email.com to the end of it ex) john.l@email.com BEFORE CLICKING NEXT uncheck the "Don't show this dialog again" box
-
After you click ok, type in a message describing what you did. This message will exist on the internet forever so complete words, no foul language, or derogatory comments. Then click commit.
-
Then you need to check that no one else made changes since you last committed. You need to pull from the master branch to make sure no other changes were made. Right click on the project and go to Team -> Pull. If there are conflicts resolve them and commit them by going back to step 2.
-
After you pulled the latest changes from github you need to push your changes to github. To do this you need to right click the project then go to Team -> Push to Upstream. Type in your github account info if prompted. Navigate to this address to verify that your commit has made it to github.