Note: No sooner did I Tweet the location of this blog post and I get an email about it already being favorited!
Our topic was, Git with Your Program, an introduction to Git consisting of lecture and demonstrations of Xcode, GUI Git Clients, interacting with inexpensive Amazon EC2 (AWS) and Raspberry Pi computers, and GitHub proper. I used a MacBook Pro running Mac OS X 10.8.4 for the presentation.
This post will cover my portion of the presentation: Using Xcode 4.6.3 and Terminal with Amazon EC2 and Raspberry Pi computers. I include here some of linked online materials (including window snapshots) used in my presentation.
Each pdf should be downloaded to your hard disk and then opened in Apple’s Preview or Adobe Reader application to display the thumbnails to use as referenced page numbers. Assumptions are made that you may follow the information with some of your own interpretations as required.
These documents are listed in their presented order in pdf format from the meeting:
0) Git Server Keynote Slides [with active links]
- Go through each slide (page) to review the presentation [ updated July 24, 2013 at 8:45 pm Pacific ]
00) Git Server Creation and Xcode Slides
- Page 1 shows Amazon AWS Login Page.
- On following pages that have a red bar displayed on the page it indicates where in the actual web browser (logged into AWS) the user should click on the link to proceed. Your server names and settings need to be personalized for your needs. Check the AWS Help for more information.
- Page 28 is the place where you find your public DNS address to connect with your new server.
- Page 29 shows an Apple’s Terminal window to issue a command line opening your newly created AWS server. The green highlight is used to indicate the commands you would execute. Again, your values are likely to be different.
- Page 30 indicates a successful connection to the new server.
- Page 31 and 32 shows the command to install Git on your server.
- Page 33 shows the logout command to exit the AWS Server.
- The green highlight is used to indicate the commands you would execute to navigate your server, list files, and create new directories to use with Git Remote Repositories. A remote repository directory’s name always ends in ‘.git‘.
- Learn about the command: ‘git init – – bare‘ if you feel the need.
- The last page shows a ready to use git remote repository named ‘sdios_demo_2013_22_07.git‘ used at the SDiOS presentation.
- Page 1 shows starting Xcode 4.6.3.
- Page 2 indicates selecting the option ‘Create a new Xcode project‘.
- Pages 3, 4, and 5 show:
- selecting the type of project
- naming and configuring it
- saving it to the project folder with the checkbox selected to create a local git workspace
- Pages 7 and 8 asks you to create a new empty file named ‘ReadMe‘ and saving it into the project folder.
- Page 9 shows the new read me document displayed in the Xcode project window navigation pane. The ‘A‘ next to the filename means Git understands this to be a newly added file.
- Pages 10 and 11 show the relocation of the ReadMe file and entry of a one line sentence into that document.
- Page 12 is the result of you:
- selecting the ‘File->Source Control->Commit…‘ menu item
- entering a salient comment to reflect the updated content
- clicking the ‘Commit‘ button
- Page 13 reflects that Git recognizes the files are accepted as staged into the Git local workspace.
- Page 14 shows the Terminal Window, changing the directory to the Xcode project, ‘SDiOS Git Demo‘ on the Desktop.
- Page 15 shows the command line executing:
- ‘git remote add origin‘ and the path to the ‘Git Remote Repository‘ on the ‘AWS Server‘
- the command to list the contents of the current directory with the hidden ‘.git’ directory orange highlighted.
- Page 16 shows the ‘origin‘ remote now selected and the username and Location at the bottom of the window.
- Page 17 is the result of you:
- selecting the File->Source Control->Push…’ menu item
- verifying the ‘origin/master(create)‘ is green-lighted to save your changes into the local workspace Git database
- Page 18 shows the Xcode project title in the left-hand column is selected revealing the history contained in the Git database for this project.
Command Line Local Access to Xcode Project [ Not Used ]
- Page 1 shows:
- the command line to return to the Xcode project folder
- your issuance of the Git command, ‘git status’
- Page 2 shows:
- Xcode Organizer Repository with Xcode project selected
- Remotes selected with the ‘remote location path’ as shown indicating a new remote on a Raspberry Pi (Rpi) computer running Git. The same files from the Xcode project in the local workspace were previously pushed to the Rpi remote repository.
- Page 3 shows the:
- command line access to the AWS Server remote for the Xcode project
- indicating the result of the Git command: ‘git log‘
- Page 4 shows the:
- command line access to the Rpi Server remote for the Xcode project
- results of using the Git command: ‘git log –pretty=oneline‘
- A document with some tips for notifying computer where the private keys are and that the permissions for the folder and files are set correctly.
- A document describing, “Adding existing Xcode project to remote git Repo on Raspberry Pi computer.”
03) Xcode Clones
- Images of the Xcode approach to clone a project from a Git Server Remote Repository using the two following references:
- A document with some tips for entering the path strings to Git Remote Repositories in Xcode
05) Git Projects with Without Xcode
- A document describing how to use an, AWS Git Server Without Xcode
- A document describing how to use a, Raspberry Pi Git Server Without Xcode
Be sure to stop your AWS Instances if you want to cease the hourly charges to run it.
After stopping your server, you may return later to easily start it up again. See the AWS Help pages for learning how to do that.
If you instead terminate the server, you’ll need to recreate it again a new.