官术网_书友最值得收藏!

Creating a Git repository

This step is optional but highly recommended. It will prevent you from losing progress when you accidentally delete files and allow you to easily revert changes or try experiments without fear of diverging from the examples in the book.

You may also choose to use GitHub (or another code sharing site) to upload your code. This protects your code from hard drive failure and makes it easier to share and collaborate with others. Again, this step is optional but recommended. If you want to use Git and GitHub, perform the following steps:

First, we will install GitHub. The following instructions are for OS X only. If you're on Windows, download the GitHub client from windows.github.com and install it the way you would install other Windows applications:

  1. Open mac.github.com in your browser.
  2. Click on Download GitHub Desktop.
  3. After the download is complete, open the application.
  4. Click on Move to my application folder.
  5. Click on Continue.
  6. If you don't have a GitHub account already, create one here; otherwise, log in with your existing credentials.
  7. Click on Continue.
  8. Enter your name and e-mail address.
  9. Click on Install Command Line Tools.
  10. Click on Continue.
  11. Click on Done:

    GitHub tool

Create a repository and upload it to GitHub:

  1. Click the + icon to create a repository.
  2. Type todo-app for the repository name.
  3. Click on Choose….
  4. Select a folder on your computer where you want to develop the app. (I recommend creating a projects directory under $HOME.)
  5. Click on Open.
  6. Click on Create Repository.
  7. Click on Publish to upload your new repository to GitHub.
  8. Type Initial commit in the description field.
  9. Click on Push Repository.

That's it! After you publish to GitHub, you can log in to your GitHub account and view these changes from any computer or device. You can download the repository, share it with others, and even make changes directly through your browser.

GitHub is free for open source software (OSS) projects. If you want to make the repository private, GitHub charges a reasonable monthly fee. Alternatively, you can choose not to use GitHub, but you'll want to make sure to back up your repository.

As we continue to develop the app, we'll prompt you to commit your changes to Git. As a developer, committing to Git should be as common and natural as saving files in your editor.

主站蜘蛛池模板: 夏河县| 莒南县| 广西| 南澳县| 信丰县| 武川县| 镇宁| 天门市| 繁峙县| 晋宁县| 梁山县| 安西县| 普宁市| 景德镇市| 绍兴县| 司法| 盐津县| 永州市| 临猗县| 政和县| 咸阳市| 绥宁县| 正阳县| 侯马市| 宣武区| 望江县| 日喀则市| 余姚市| 宝山区| 桂林市| 临澧县| 凯里市| 杂多县| 镶黄旗| 交口县| 定襄县| 芮城县| 广平县| 华亭县| 台北县| 乐山市|