What is GitHub?

GitHub is a code hosting platform for version control and collaboration.代码托管平台。

repositoriesbranchescommits, and Pull Requests

Create a Repository

  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.
  5. Click Create repository

Create a Branch

Branching is the way to work on different versions of a repository at one time.

By default your repository has one branch named master which is considered to be the definitive branch.

We use branches to experiment and make edits before committing them to master.

When you create a branch off the master branch, you’re making a copy, or snapshot, of master as it was at that point in time. If someone else made changes to the master branch while you were working on your branch, you could pull in those updates.

  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.

Make and commit changes

On GitHub, saved changes are called commits.

Each commit has an associated commit message, which is a description explaining why a particular change was made. Commit messages capture the history of your changes, so other contributors can understand what you’ve done and why.

  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.

These changes will be made to just the README file on your readme-edits branch, so now this branch contains content that’s different from master.

Open a Pull Request

Pull Requests are the heart of collaboration on GitHub. When you open a pull request, you’re proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch. Pull requests show diffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in green and red.

As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished.

1、Click the  Pull Request tab, then from the Pull Request page, click the green New pull request button.

2、Select the branch you made, readme-edits, to compare with master (the original).

3、Look over your changes in the diffs on the Compare page, make sure they’re what you want to submit.

4、When you’re satisfied that these are the changes you want to submit, click the big green Create Pull Requestbutton.

5、Give your pull request a title and write a brief description of your changes.

When you’re done with your message, click Create pull request!

Merge your Pull Request

In this final step, it’s time to bring your changes together – merging your readme-edits branch into the master branch.

  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.

Celebrate!

By completing this tutorial, you’ve learned to create a project and make a pull request on GitHub!   

Learn Git and GitHub without any code!的更多相关文章

  1. 【风马一族_git_github】git与github的英文记录

    Pull requests  Issues Gist 请求 问题 要点 ---------------------------------------------------------------- ...

  2. remote: Permission to user_name/Code.git denied to other_user_name. fatal: unable to access 'https://github.com/user_name/Code.git/': The requested URL returned error: 403

    Error msg: $ git push remote: Permission to xxx/Code.git denied to xxxxxx. fatal: unable to access ' ...

  3. Git 一些关于 Git、Github 的学习资源

    一些关于 Git.Github 的学习资源 昨天浏览 Github 的是时候发现了 Githug 这个游戏,这个游戏用来帮助菜鸟们学习使用 Git 的. Githug is designed to g ...

  4. Windows下使用Git和GitHub.com

    1.首先介绍一下什么是Git和GitHub       Git是一个分布式的版本控制系统,最初由Linus Torvalds编写,用作Linux内核代码的管理.在推出后,Git在其它项目中也取得了很大 ...

  5. 适合小白/外行的git与github最基础最浅显教程

    首先声明,这是适合小白/外行/初学者/学生看的最基础最简单的git与github教程,已经能使用svn,git等工具的朋友请不要看这篇文章来浪费时间了. 想进一步学习git的,推荐去廖雪峰博客学习. ...

  6. get最简单直接粗爆git与github教程

    Git是分布式版本控制系统(可以理解为文件管理拓展工具) github一个在线文件托管系统(可以理解为一个在线云盘) 准备工作,在git官网下载git软件件,安装git软件,以windows.为例,下 ...

  7. Git 与 GitHub 简介

    Git 与 GitHub 的来历 Linux 之父 Linus 在 1991 年创建开源的 Linux 操作系统之后,多年来依靠全世界广大热心志愿者的共同建设,经过长足发展,现已成为世界上最大的服务器 ...

  8. 【原创】Git 分支的合并【Learn Git Branching】

    merge       git merge是我们要学习的合并工作的第一个方法.合并产生一个特殊的提交记录,它包含两个唯一父提交.有两个父提交的提交记录本质上是:“我想把这两个父提交本身及它们的父提交集 ...

  9. Git和Github的基本操作

    一.了解Git和Github 1.什么是GIT? Git是一个免费.开源的版本控制软件 2.什么是版本控制系统? 版本控制是一种记录一个或若干个文件内容变化,以便将来查阅特定版本修订情况得系统. 系统 ...

随机推荐

  1. mac显示隐藏文件

    苹果Mac OS X操作系统下,隐藏文件是否显示有很多种设置方法,最简单的要算在Mac终端输入命令. 显示/隐藏Mac隐藏文件命令如下(注意其中的空格并且区分大小写): 第一种 显示Mac隐藏文件的命 ...

  2. 【译】使用 CocoaPods 模块化iOS应用

    原文翻译自:Using CocoaPods to Modularize a Big iOS App 为你的移动应用选择正确的架构是一件相当大的事情,这会对你的工作流程造成影响,陷入面对的问题,可能是一 ...

  3. [慢查优化]建索引时注意字段选择性 & 范围查询注意组合索引的字段顺序

    文章转自:http://www.cnblogs.com/zhengyun_ustc/p/slowquery2.html 写在前面的话: 之前曾说过"不要求每个人一定理解 联表查询(join/ ...

  4. Eclipse集成Tomcat:6个常见的”how to”问题

    学习一门新技术通常是一个很困难的过程,当你想要同时学习两门有交叉的新技术的时候,这个过程会变得更困难.Tomcat和Eclipse是Java EE开发中最流行的2个必备神器,因此,为了成为一个专业的开 ...

  5. Myeclipse 构建工作空间出错

    MyEclipse工作空间报错如下:'Building workspace' has encountered a problem. Errors occurred during the build.并 ...

  6. ubuntu 12.04 sever下安装jre

    具体步骤如下: 首先打开http://www.java.com/en/download/linux_manual.jsp?locale=en 选择你想下载的版本,此处我选择的是jre-7u25-lin ...

  7. Axure RP 7.0注册码

    Axure RP 7.0注册码 用户名:axureuser 序列号:8wFfIX7a8hHq6yAy6T8zCz5R0NBKeVxo9IKu+kgKh79FL6IyPD6lK7G6+tqEV4LG   ...

  8. protobuf编译出错的解决方案(iOS,OSX)

    protobuf 最近使用protobuf,变编译工具时遇上一点问题.现在附上解决方案 编译过程 完全参照 https://github.com/alexeyxo/protobuf-objc 编译出错 ...

  9. Spring Boot with Spring Data JPA (1) - Concept

    What's Spring Data JPA? According to Pivotal, Spring Data JPA, part of the larger Spring Data family ...

  10. python调用其他程序或脚本方法(转)

    python运行(调用)其他程序或脚本 在Python中可以方便地使用os模块运行其他的脚本或者程序,这样就可以在脚本中直接使用其他脚本,或者程序提供的功能,而不必再次编写实现该功能的代码.为了更好地 ...