Information Technology Reference
In-Depth Information
After you have an online repository, you can tell Git to copy your project files to it. Eventually Xcode 4 will in-
clude UI support for this operation. At the time of writing, it's easier to perform it from the command line.
In Terminal, cd to the project directory with the original source. For example, if the directory is /MyProjectsX4/
LocalGit type:
cd MyProjects/X4/LocalGit
Next, tell Git that you'll be using the remote repository. Type on a single line:
git remote add <RepositoryName> git@github.com:<YourGitHubUserName>/<Repos-
itoryName>.git
To copy the files, type this:
git push <RepositoryName> --all
The --all switch copies all branches, including the master. Figure 14.21 shows the result. The branches are
listed under the SwitchBranches option at the left, and commits for the active branch appear in a list beneath
the main menu. You can select the Source menu item at the top left and drill down through the source code to
view.
FIGURE 14.21
Review the online repository after copying. For clarity, a few more commits were added to this project before it
was uploaded. Note how the commit comments you type into Xcode are copied to GitHub.
Search WWH ::




Custom Search