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. yii2 开源插件与系统

    yii2干货集:https://github.com/forecho/awesome-yii2 商城 samdark/yii2-shop composer global require "f ...

  2. [Exchange 2013]创建约会和会议

    简介 会议和约会之间的重要区别是,会议有与会者,并且没有约会.约会和会议可以是单实例或属于重复序列,但与会者. 房间或资源中不包括约会,因为它们不需要发送一条消息.在内部,Exchange 使用相同的 ...

  3. 光驱SSD安装Win7+ubuntu系统双系统

    准备条件: U盘,32GB,三星品牌 SSD,120GB,三星品牌 win7旗舰版,Ghost系统(安装简单嘛),Ylmf_Ghost_Win7_SP1_x64_2016_1011.iso ubunt ...

  4. 安装出现了error launching installer

    安装geany时,出现问题: 两种解决方法: 解决的办法是: 在控制面板中寻找"区域.语言设置"--管理--更改系统区域设置--中文(简体.中国),确定退出即可! 但是....我不 ...

  5. 使用xib封装一个view的步骤

    1.新建一个xib文件描述一个view的内部结构(假设叫做SSTgCell.xib) 2.新建一个自定义的类 (自定义类需要继承自系统自带的view, 继承自哪个类,  取决于xib根对象的Class ...

  6. fedora配置163为yum的源

    一种方法: 1.下载  http://mirrors.163.com/.help/fedora-163.repo 和 http://mirrors.163.com/.help/fedora-updat ...

  7. 用Python生成测试数据

    转载自:http://blog.csdn.net/caz28/article/details/45972109 有时我们需要大量的数据,一般编个程序生成一堆随机数据,Python很适合文本处理,干这个 ...

  8. Unity3D 原生Android结合UnityPlayerActivity开发遇到的问题

    需求是原生Android 的Activity启动UnityPlayerActivity,按Back键后返回原来的Activity 1.在AndroidManifest.xml中的UnityPlayer ...

  9. Reverse Core 第一部分 代码逆向技术基础

    @date: 2016/10/14 <逆向工程核心原理>笔记 记录书中较重要的知识,方便回顾 ps. 因有一些逆向基础,所以我本来就比较熟悉的知识并未详细记录 第一章 关于逆向工程 目标, ...

  10. linux c system返回值问题总结

    先看例子 #include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include <sys ...