GitHbub使用

GitHbub使用

GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.


Step 1.创建一个仓库

仓库可以用来组织项目的,可以包含文件、文件夹、图片、视频、数据集以及在项目中所需要的任何资源。
最好也闯进一个README文件,来描述该项目。

  1. In the upper right corner, next to your avatar or identicon, click and then select New repository.
  2. Name your repository hello-world.
  3. Write a short description.
  4. Select Initialize this repository with a README.

Step 2.创建一个分支(branch)

分支是在不同版本的仓库上工作的方式,仓库默认有一个主分支master。创建的分支实际上是master的快照。
创建一个分支,下拉master branch,create branch

  1. Go to your new repository hello-world.
  2. Click the drop down at the top of the file list that says branch: master.
  3. Type a branch name, readme-edits, into the new branch text box.
  4. Select the blue Create branch box or hit “Enter” on your keyboard.

Step 3.修改并提交change

  1. Click the README.md file.
  2. Click the pencil icon in the upper right corner of the file view to edit.
  3. In the editor, write a bit about yourself.
  4. Write a commit message that describes your changes.
  5. Click Commit changes button.

Step 4.打开合并请求(open a pull request)

点击PULL REQUESTS,点击NEW pull request
之后会比较修改的地方,base:compare:
点击Create Pull Request


Step 5.将合并请求的内容合并

  1. Click the green Merge pull request button to merge the changes into master.
  2. Click Confirm merge.
  3. Go ahead and delete the branch, since its changes have been incorporated, with the Delete branch button in the purple box.
原文地址:https://www.cnblogs.com/nadech/p/8496579.html