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

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.

主站蜘蛛池模板: 武胜县| 沙田区| 沁源县| 绵阳市| 毕节市| 离岛区| 康定县| 色达县| 宜川县| 沛县| 灯塔市| 开鲁县| 二连浩特市| 钦州市| 洪江市| 吉林市| 三穗县| 长顺县| 友谊县| 长寿区| 运城市| 仙桃市| 洛浦县| 寿光市| 英吉沙县| 津市市| 张掖市| 和田市| 固安县| 阜南县| 中方县| 宜黄县| 高陵县| 墨竹工卡县| 横峰县| 常熟市| 沧州市| 望都县| 阿鲁科尔沁旗| 巴塘县| 随州市|