Step 3: Clone the Repository
Back at GitHub, go to this url: https://github.com/CP365-B6-2011/Final_Project Copy the url on that page (where it says SSH|HTTP|Git Read-only). We need it to clone.
Go back go Eclipse, and go to File -> Import. Expand the Git category, and click “Projects from Git”. This will pop up a window with all of your configured repositories, which at this point is none. Click “Clone” at the top right, and it should autofill the fields with the URL we’ve copied. If it doesn’t, paste it into the url field. Under protocol, go ahead and change it to SSH, and click “Next”. It’ll try to authenticate to the server, and if you’ve set up your SSH key correctly it’ll succeed! Enter any passwords it asks for and continue. It’ll pop up a window with the various branches on the server; you can clone any of them that you want, but I recommend that you keep your team’s code in a branch off of master. Definitely clone master. Once you’ve selected the branches you want, click “Next” and it’ll ask you for a directory to put it into; put it wherever you want to. Don’t change anything else. That will give you a copy of master that we can work on, and everything should be kosher.
Back to the main Import from Git screen, select the repository you just cloned and click “Next”. Leave the defaults on the next page, and click “Next” again. Check “CP365_FP_GIT” and click “Finish”. What do you know? You have a new project, with Git and everything!
Step 4: Working on the Project
If you didn’t quite catch my presentation, there’s some OpenOffice Impress slides you might want to look at here.
It’s really best if each team works in their own branch. I’ll set some branches up for each team later this afternoon, and I’ll show you how to get them at our meeting. Until then, if you’re really skippy and doing work already, feel free to work in master.
As far as working goes, do your work on whatever you’re doing, then add our files by holding CTRL while clicking on each of them; right click on one of the selected files; go to “Team” -> “Add” and it will add your files to the repository. Immediately after doing that, commit by going to “Team” -> “Commit”. Be sure to enter useful messages, we want to be able to see what’s going on! When you’ve got en enough of your work done that you feel like it should be shared, go to “Team” -> “Push to Upstream”. If it gives you a failure on the popup window, pull from upstream before pushing; it probably means someone pushed before you did. Well, that’s all for now. Check back for more in a later post!