github 和git

by Yung L. Leung

梁永良

Google编码文档:Git和GitHub (The Google Doc of Coding: Git & GitHub)

介绍 (Introduction)

Google Doc is a server-side (online) word processor. A user’s files are created via a web browser & stored in a server. This software makes it possible for users to share documents with others for collaboration. Normally, the workflow is the following:

Google Doc是服务器端(在线)文字处理器。 用户的文件是通过Web浏览器创建的,并存储在服务器中。 该软件使用户可以与他人共享文档以进行协作。 通常,工作流程如下:

  • Create a document & fill with content.创建一个文档并填充内容。
  • Save content & share file with others for collaboration.保存内容并与他人共享文件以进行协作。
  • Members contribute on the same document, online.成员在线发表同一文档。

Aside from file sharing, another important feature is the ability to undo or redo changes made to the ‘master’ file. The changes made to the document are sequential and any user can undo (or redo) those changes.

除文件共享外,另一个重要功能是能够撤消或重做对“主”文件的更改。 对文档所做的更改是顺序的,任何用户都可以撤消(或重做)这些更改。

But, this can quickly become a big mess, especially when multiple users are simultaneously adding or editing content. Who created or changed what content and for what reason is unknown.

但是,这很快就会变成一团糟,尤其是当多个用户同时添加或编辑内容时。 谁创建或更改了哪些内容以及出于什么原因而未知。

Atom,Git和GitHub (Atom, Git & GitHub)

In software development, the tools for collaborative programming consists of a text editor, version control system & an online repository.

在软件开发中,用于协作编程的工具包括文本编辑器,版本控制系统和在线存储库。

Atom (or any text editor) is like your client-side (desktop) word processor, except the document is code written in some language (i.e: JavaScript).

Atom(或任何文本编辑器)就像您的客户端(台式机)文字处理器一样,不同之处在于文档是用某种语言(即JavaScript)编写的代码。

Git is a tool for selectively recording the history of your project’s saved changes. It is a way to ‘control’ all the different versions of your programming project.

Git是用于选择性记录项目保存的更改历史的工具。 这是一种“ 控制 ”编程项目的所有不同版本的方法。

GitHub is like your Google Docs, except you can create & save your version of the code offline, before ‘pushing’ it to be saved online.

GitHub就像您的Google文档一样,只不过您可以脱机创建和保存代码版本,然后再“ 推送 ”以使其在线保存。

So, you have your text editor (Atom), version control system (Git) & remote file storage system (GitHub). These are the basic elements that solve the problem of collaboration, especially for software developers. The workflow is similar to the use of Google Docs, with some differences.

因此,您将拥有文本编辑器 ( Atom )版本控制系统( Git )远程文件存储系统( GitHub ) 。 这些是解决协作问题的基本元素,特别是对于软件开发人员而言。 工作流程类似于Google文档的使用,但有一些区别。

协同软件开发工作流程 (Collaborative Software Development Workflow)

  1. Create online (remote) GitHub repository (https://github.com/new)

    创建在线(远程)GitHub存储库( https://github.com/new )

2. Create an offline (local) repository. The terminal command git init project_name initiates your project by creating a folder to store its content & version control files to store a history of its changes

2.创建一个离线(本地)存储库。 终端命令git init project_name通过创建一个文件夹来存储其内容和版本控制文件来存储其更改历史,从而启动您的项目

  • The idea is to eventually have a remote & a local copy of your project.这个想法是最终拥有项目的远程和本地副本。

3. Use a text editor to build content. This is where you begin to write your program with Atom and create your JavaScript files.

3.使用文本编辑器构建内容。 在这里,您可以开始使用Atom编写程序并创建JavaScript文件。

4. Save the content & note significant historical progressions in your project. The terminal command git add . adds all folder contents, all the changes, to be committed in history. The command git commit -m ‘message’ commits the changes to history, along with a message explaining the changes made. The command git push pushes your files and historical data to your remote repository.

4.保存内容并记录项目中的重要历史进度。 终端命令git add。 添加所有文件夹内容,所有更改在历史记录中提交git commit -m'message'命令将对历史的更改以及解释所做更改的消息提交至历史记录。 git push命令将文件和历史数据推送到远程存储库。

  • As you are continuously making progress in your project, you are recording the rationale behind each stage of development (git add, git commit, git push).随着您在项目中不断取得进展,您正在记录每个开发阶段(git add,git commit,git push)的原理。

5. Share file with others for collaboration. Once your remote repository has content, you can share your project with collaborators.

5.与他人共享文件以进行协作。 远程存储库包含内容后,您可以与协作者共享项目。

  • After members accept the invitation, they can fork a branch off of the remote repository and clone the project locally (git clone <repo url or ssh>).

    成员接受邀请后,他们可以从远程存储库分支一个分支并在本地克隆项目( git clone <repo url或s sh>)。

  • Each collaborator can build content, save the content and push it to their remote branch.每个协作者都可以构建内容,保存内容并将其推送到其远程分支。
  • As collaborators continue to build and save their content, they end up building forks in the GitHub “sky” (git add, git commit, git push).

    随着协作者继续构建和保存其内容,他们最终在GitHub“ sky”( git addgit commitgit push )中构建派生。

  • Each fork is a collaborator branching off from the original project so that members can work in parallel with the originator, without disrupting each other’s progress. Every time a collaborator performs a git push, the fork elongates.

    每个分支都是从原始项目分支出来的协作者,因此成员可以与发起者并行工作,而不会干扰彼此的进度。 每次协作者执行git push时 ,叉子都会拉长。

6. Merge branched files. At the request of the collaborators, the originator can pull their branch to be merged with the master branch.

6.合并分支文件。 应协作者的请求, 发起者可以拉出其分支以与主分支合并。

  • When a collaborator submits a pull request, the originator can perform a git pull to merge the branches into a single updated version of the project. This new version can then be pushed into the remote repo for all to see and use.

    当协作者提交请求请求时,发起者可以执行git pull来将分支合并到项目的单个更新版本中。 然后可以将此新版本推送到远程仓库中,以供所有人查看和使用。

版本控制和文件共享 (Version Control & File Sharing)

In collaborative software development, changes are made to multiple clones of a master copy, before they are merged to the master file. So the changes made are sequential, but with overlaps in time.

在协作软件开发中,在将主副本的多个克隆合并到主文件之前对其进行了更改。 因此,所做的更改是顺序的,但时间上有重叠。

Every new piece of content that is created on a clone is ultimately pushed towards a collaborator’s master repo. Every collaborator’s commit message provides feedback to the originator so that they can make intelligible edits & additions to the original project.

克隆上创建的所有新内容最终都会推向协作者的主存储库。 每个协作者的提交消息都会向发起者提供反馈,以便他们可以对原始项目进行清晰的编辑和添加。

This would be a difficult feat without Git’s version control & GitHub’s file sharing. A simple terminal command (git branch &lt;branch_name>) can take a clone on a local machine and create a branch so that a different version of the project can be developed. A user can then note take their progression (git add & git commit) at any point in time. If there were any problems with an active version, the user can simply switch to a previous branch (git checkout <branch_name>) and continue from there.

如果没有Git的版本控制和GitHub的文件共享,这将是一项艰巨的任务 。 一个简单的终端命令( git branch& lt; branch_n a me>)可以在本地计算机上进行克隆并创建一个分支,以便可以开发不同版本的项目。 然后,用户可以在任何时间记下自己的进度(git add和git commit)。 如果有与现行版本的任何问题,用户可以简单地切换到以前的BR ANCH(GIT CHEC KOUT <br 一个 nch_name>),并从那里继续。

This is the meaning of version control. At any point in time, a user can switch to alternate versions of a project, while committing intelligible notes that explain the progression of each version. The user has full control over the versions that are developed. A simple terminal push to the GitHub “clouds” makes any version available to their collaborators. This is the power of using Git & GitHub in collaborative software development.

这就是版本控制的含义。 在任何时候,用户都可以切换到项目的备用版本,同时提交可解释每个版本进度的可理解注释。 用户可以完全控制所开发的版本。 只需将终端推送到GitHub“云”,即可向其合作者提供任何版本。 这是在协作软件开发中使用Git和GitHub的强大功能。

References:

参考文献:

Git - VideosEdit descriptiongit-scm.comLearn Git with Bitbucket Cloud | Atlassian Git TutorialLearn Git with Bitbucket Cloudwww.atlassian.comHow Google Docs WorksBack End of Google Docs - The back end of Google Docs relies on simple, inexpensive hardware and software. Learn more…computer.howstuffworks.comAtom (text editor) - WikipediaAtom is a free and open-source text and source code editor for macOS, Linux, and Microsoft Windows with support for…en.wikipedia.orgGit - WikipediaGit () is a distributed version control system for tracking changes in source code during software development. It is…en.wikipedia.orgGitHub - WikipediaGitHub offers plans for enterprise, team, pro and free accounts which are commonly used to host open-source software…en.wikipedia.org

Git- 视频 编辑描述 git-scm.com 使用Bitbucket Cloud学习Git | Atlassian Git教程 通过Bitbucket Cloud学习Git www.atlassian.com Google Docs的工作 原理 Google Docs的 后端 -Google Docs的后端依赖简单,廉价的硬件和软件。 了解更多信息…… computer.howstuffworks.com Atom(文本编辑器)-Wikipedia Atom是针对macOS,Linux和Microsoft Windows的免费开放源代码文本和源代码编辑器,并支持… en.wikipedia.org Git-Wikipedia Git( )是一个分布式版本控制系统,用于在软件开发过程中跟踪源代码的更改。 它是… en.wikipedia.org GitHub-Wikipedia GitHub提供了企业,团队,专业人士和免费帐户的计划,这些计划通常用于托管开源软件… en.wikipedia.org

翻译自: https://www.freecodecamp.org/news/the-google-doc-of-coding-git-github-ec103e87926d/

github 和git

github 和git_Google编码文档:Git和GitHub相关推荐

  1. Git和Github介绍,294页『Git与Github学习使用指南』分享

    1 前言 相信大家写代码的时候,心里肯定想找一个别人写好的,可以直接上手的代码,再做相应的修改和改进.那哪里有这些代码呢? 答案自然是Github了,那GitHub又是啥? GitHub是世界上最大的 ...

  2. 【转】理清基本的git(github)流程

    概述 当我初次接触git时,我需要快速学习基本的git工作流,以便快速接收一个开源Web项目维护.但是,我很难理解工作流程,因为我不太了解git使用关键点. fork,clone,pull.branc ...

  3. 对初学者友好的Git和Github使用指南之介绍和安装篇

    本文首发在个人博客:ladyzero.cool,欢迎前往阅读,阅读体验更佳. 原文地址:对初学者友好的Git和Github使用指南之介绍和安装篇 前言 本文将初步介绍Github和Git是什么,以及介 ...

  4. mac azure git_将Azure Data Studio与Git和GitHub集成

    mac azure git In the last article, Source Control using Git in Azure Data Studio (ADS), we explored ...

  5. git与github远程连接代码库使用笔记

    一.安装与账号添加 1.git安装 目前windows版本的git有几种实现,但我们选择msysgit发行版,这是目前做得兼容性最好的.下载地址:http://code.google.com/p/ms ...

  6. Git克隆Github项目学习笔记

    文章目录 前言 一.下载 Git 二.GitHub官网注册自己账号 三.使用SSH建立Git和GitHub之间的连接 四.在Pycharm工具中配置集成Git和GitHub 五.从GitHub上克隆项 ...

  7. git与github的使用方法

    git与github的使用方法 一.git与github是什么 什么是git? Git和GitHub的区别? 二.git常用指令 三.建立本地git仓库 1.安装git 2.创建本地仓库 三.在git ...

  8. 什么是 Git、Github?

    前言 Git 和 GitHub 是软件开发人员必不可少的工具,但是你知道它们是什么吗?为什么了解和使用 Git 和 GitHub 对于开发人员很重要?这个系列,我会从最基础的概念出发,并结合实际操作, ...

  9. Git和Github简单教程【转】

    转自:https://www.cnblogs.com/schaepher/p/5561193.html#clone 原文链接:Git和Github简单教程 网络上关于Git和GitHub的教程不少,但 ...

最新文章

  1. python模块--Beautifulsoup
  2. C++输入输出进制、数据宽度与对齐、精度、取整
  3. 顶级程序员的10条最佳实践
  4. 洛谷P2502:[HAOI2006]旅行
  5. java怎么给类中的私有变量赋值_Java核心技术笔记分享------第二章 类与对象
  6. 腾讯基于 Flink SQL 的功能扩展与深度优化实践
  7. 在CodeBlocks上配置OpenGL问题
  8. mysql数据库root密码在哪个文件中_mysql - 本地数据库忘记了root用户的密码
  9. Java中锁的使用和实现
  10. 一般服务器显示闪存多少合适,现在服务器一般内存多大合适
  11. 每天一个linux命令(16):witch命令
  12. Build Settings发布设置
  13. 防火墙添加ip白名单_宝塔防火墙IP白名单添加/导入知道创宇云CDN节点IP段
  14. wowza 降低延迟
  15. vrep+matlab
  16. 没有用递归,写了一个文本转成树的小程序,代码凑和看吧
  17. 服务器的回收站在哪个文件夹,Windows系统回收站的文件保存在哪个磁盘上
  18. 802.11ac linux驱动下载,下载的驱动程序Realtek 8811CU Wireless LAN 802.11ac USB NIC 1030.22.0405.2017...
  19. 从交互设计“流行元素”中启发
  20. 数据网站 免费数据网站

热门文章

  1. JVM—GC垃圾回收器总结
  2. 异常的产生与传递 java
  3. 生产者消费者模型 java
  4. 数组算法 中部删除数据 1202
  5. myeclipse 10.7安装过程与初次启动
  6. 办公自动化-发送邮件功能-无格式-有格式-带附件-0225
  7. 谷歌浏览器安装过程-0223
  8. Synchronize和ReentrantLock区别
  9. 建站利器 | 阿里巴巴上线静态开源站点搭建工具 Docsite
  10. 转载:【微信小程序】 wx:if 与 hidden(隐藏元素)区别