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. Fedora20-64bit cross-compiling arm-linux-gcc

    0按照友善之臂的手册建立交叉编译环境时,添加用户变量,最好是去更改 profile 文件 因为 profile 是所有用户都可以使用的,类似于 windows 中的系统变量 而 .bashrc 只有该 ...

  2. visio二次开发——图纸解析之形状

    今天有空,下班前补齐解析visio图形形状的方法,包含图形背景色.字体颜色.备注信息.形状数据取值. /// <summary> /// 设置形状的选择属性 /// </summar ...

  3. 3. web前端开发分享-css,js提高篇

    一. css基础知识掌握之后(个人的标准是:弄清块元素与内联元素的区别,弄清float的应用场景,弄清position[pə'zɪʃən] 下五个属性static['stætɪk],relative[ ...

  4. vs插件ZunKoIDE

    →〇,配置: vs →壹,默认背景图路径 C:\Users\{用户名}\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\gqyswd1b.dv ...

  5. Windows 8.1开发环境初始化

    Windows 8.1 en 64bit 以管理员权限运行CMD,命令:POWERCFG -H OFF,删除hiberfil.sys

  6. 国内github访问慢的解决方法

    本文是windows处理方法,macos方法也差不多. 一般Github的访问有两部分:主站的访问和二级域名的资源加载(比如样式文件等) 一般Github加载缓慢,主要是 assets-cdn.git ...

  7. WebApi官方系列

    一.入门 1.1Asp.Net WebApi2 入门 1.2WebApi2的Action返回值 1.3WebApi2自动生成帮助页 二.路由 2.1WebApi2的路由规则 2.2WebApi2的Ac ...

  8. 使用node初始化项目

    初始化项目 在建项目的时候经常会建很多文件夹和文件,今天使用node初始化项目自动生成这些内容. 执行步骤 执行命令 node init 初始化项目生成package.json 设置配置文件 var ...

  9. 20个Mac用户必须掌握的触摸手势

    我第一次接触MacBook时,最令我惊叹的就是MacBook的触摸板,通过各种手势,完全可以不用鼠标,且有些时候更加的快捷和方便.那么都有哪些手势呢?可以通过 -> 来查看学习各种手势的使用,下 ...

  10. jeecg bootstrap修改单列模版

    在作者原来的模版上增强单列模版 <%@ page language="java" import="java.util.*" contentType=&qu ...