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

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.

主站蜘蛛池模板: 明溪县| 辰溪县| 利川市| 竹溪县| 台州市| 额济纳旗| 佛学| 确山县| 康保县| 莆田市| 墨脱县| 盱眙县| 钦州市| 光泽县| 湖州市| 安多县| 新河县| 沛县| 四川省| 克拉玛依市| 会泽县| 呈贡县| 乃东县| 长顺县| 鄂托克旗| 井冈山市| 卢氏县| 漳平市| 茌平县| 如皋市| 西青区| 阿坝| 合作市| 柘荣县| 海林市| 沽源县| 安宁市| 太湖县| 芮城县| 伊金霍洛旗| 贡嘎县|