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

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.

主站蜘蛛池模板: 铜山县| 阿尔山市| 呼图壁县| 于田县| 潜江市| 龙泉市| 汉源县| 正镶白旗| 云和县| 荣成市| 兴文县| 克拉玛依市| 民权县| 谢通门县| 鄂尔多斯市| 嵊泗县| 若羌县| 朔州市| 庆安县| 华安县| 宁陵县| 瑞昌市| 广德县| 太湖县| 抚松县| 辽阳市| 阿坝| 伊宁县| 三亚市| 广水市| 左权县| 泰顺县| 海淀区| 隆安县| 黑山县| 大理市| 星子县| 华阴市| 平泉县| 赫章县| 五河县|