<!DOCTYPE html>
    <html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
    <head>
<title>Một yêu cầu kéo là gì?</title>
<meta name="description" content="Một yêu cầu kéo là gì? - Savefile - Blogs - https&#x3A;&#x002F;&#x002F;letrungnghia.mangvn.org&#x002F;savefile&#x002F;Philosophy&#x002F;Mot-yeu-cau-keo-la-gi-4785.html">
<meta name="author" content="Blog FOSS by Lê Trung Nghĩa">
<meta name="copyright" content="Blog FOSS by Lê Trung Nghĩa [webmaster@vinades.vn]">
<meta name="generator" content="NukeViet v4.5">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Một yêu cầu kéo là gì?">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Blogs - https&#x3A;&#x002F;&#x002F;letrungnghia.mangvn.org&#x002F;savefile&#x002F;Philosophy&#x002F;Mot-yeu-cau-keo-la-gi-4785.html">
<meta property="og:site_name" content="Blog FOSS by Lê Trung Nghĩa">
<meta property="og:url" content="https://letrungnghia.mangvn.org/savefile/Philosophy/Mot-yeu-cau-keo-la-gi-4785.html">
<link rel="shortcut icon" href="https://letrungnghia.mangvn.org/favicon.ico">
<link rel="canonical" href="https://letrungnghia.mangvn.org/savefile/Philosophy/Mot-yeu-cau-keo-la-gi-4785.html">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/" title="Blogs" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Government/" title="Blogs - Government" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Policy/" title="Blogs - Policy" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Philosophy/" title="Blogs - Philosophy" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Security/" title="Blogs - Security" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Legal/" title="Blogs - Legal" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Education/" title="Blogs - Education" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Business/" title="Blogs - Business" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Community/" title="Blogs - Community" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Interoperability/" title="Blogs - Interoperability" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Standards/" title="Blogs - Standards" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Author/" title="Blogs - Author" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Opinions/" title="Blogs - Opinions" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/CC/" title="Blogs - CC" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Cloud/" title="Blogs - Cloud" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Hardware/" title="Blogs - Hardware" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Software/" title="Blogs - Software" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Statistics/" title="Blogs - Statistics" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Trends/" title="Blogs - Trends" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/China/" title="Blogs - China" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/OSs/" title="Blogs - OSs" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Blogs/" title="Blogs - Blogs" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Outsourcing/" title="Blogs - Outsourcing" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/elearning/" title="Blogs - Elearning" type="application/rss+xml">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/assets/css/font-awesome.min.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/bootstrap.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/style.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/style.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/news.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/custom.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/assets/css/default.vi.1106.css" type="text/css">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/jquery/jquery.min.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/language/vi.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/DOMPurify/purify3.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/global.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/site.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/themes/default/js/news.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/themes/default/js/main.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/themes/default/js/custom.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/themes/default/js/bootstrap.min.js" type="text/javascript">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/themes/default/css/bootstrap.non-responsive.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/themes/default/css/style.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/themes/default/css/style.non-responsive.css">
<link rel="StyleSheet" href="https://letrungnghia.mangvn.org/themes/default/css/news.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/themes/default/css/custom.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/assets/css/default.vi.1106.css">
<style type="text/css">
	body{background: #fff;}
</style>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-70254229-3', '');
ga('send', 'pageview');
</script>
</head>
    <body>
<div id="print">
	<div id="hd_print">
		<h2 class="pull-left">Blog FOSS by Lê Trung Nghĩa</h2>
		<p class="pull-right"><a title="Blog FOSS by Lê Trung Nghĩa" href="https://letrungnghia.mangvn.org/">https://letrungnghia.mangvn.org</a></p>
	</div>
	<div class="clear"></div>
	<hr />
	<div id="content">
		<h1>Một yêu cầu kéo là gì?</h1>
		<ul class="list-inline">
			<li>Thứ hai - 24/02/2014 07:08</li>
			<li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="javascript:;" onclick="window.print()">In ra</a></li>
			<li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="javascript:;" onclick="window.close()">Đóng cửa sổ này</a></li>
		</ul>
		<div class="clear"></div>
		<div id="hometext">
		</div>
		<div id="bodytext" class="clearfix">
			P { margin-bottom: 0.21cm; }CODE.western { font-family: &quot;DejaVu Sans&quot;,monospace; }CODE.cjk { font-family: &quot;WenQuanYi Micro Hei&quot;,monospace; }CODE.ctl { font-family: &quot;Lohit Hindi&quot;,monospace; }A:link {  }<p align="JUSTIFY" style="margin-bottom: 0cm"> <b><span style="background: rgb(255, 255, 0);">What is a pull request?</span></b></p><p align="JUSTIFY" style="margin-bottom: 0cm"> by <strong>Mark Johnson</strong> on 0 , last up-dated 8 November 2013</p><p align="JUSTIFY" style="margin-bottom: 0cm"> Theo: <a href="http://oss-watch.ac.uk/resources/pullrequest">http://oss-watch.ac.uk/resources/pullrequest</a></p><p align="JUSTIFY" style="margin-bottom: 0cm"> Bài được đưa lên Internet ngày: 08/11/2013</p><p align="JUSTIFY" style="margin-bottom: 0cm"> <font color="rgb(255, 0, 0);">Lời người dịch: Khi một lập trình viên làm việc với một dự án phần mềm nguồn mở, bạn sẽ cần tới việc đệ trình mã cho dự án ngược lên dòng trên và có thể vì thế sẽ nảy sinh ra một <b>yêu cầu kéo (pull request)</b> đối với việc thu nạp mã của bạn vào dự án ngược lên dòng trên đó. Bài này sẽ giải thích tỉ mỉ về quá trình đó, đặc biệt nếu bạn làm việc với GitHub. </font></p><p align="JUSTIFY" style="margin-bottom: 0cm"> Một yêu cầu kéo là một phương pháp đệ trình các đóng góp cho một dự án <a href="http://oss-watch.ac.uk/resources/odm">phát triển mở</a>. Điều này thường là cách được ưu tiên đối với việc đệ trình các đóng góp cho một dự án bằng việc sử dụng một hệ thống kiểm soát phiên bản phân tán - DVCS (<a href="http://oss-watch.ac.uk/resources/versioncontrol">version control system</a>) như <a href="http://git-scm.org/">Git</a>. Một yêu cầu kéo xảy ra khi một lập trình viên yêu cầu những thay đổi được đệ trình tới một kho bên ngoài sẽ được xem xét để đưa vào trong một kho chính của dự án.</p><p align="JUSTIFY" style="margin-bottom: 0cm"> <b>Thực hiện một thay đổi</b></p><p align="JUSTIFY" style="margin-bottom: 0cm"> Khi đóng góp cho một dự án nguồn mở bằng việc sử dụng một DVCS, bạn sẽ có một bản sao hoặc “clone” của kho mã nguồn trong môi trường phát triển cục bộ của bạn. Ở đây, bạn có thể thực hiện các thay đổi của bạn và đệ trình chúng một cách cục bộ để tạo ra một lịch sử các sửa đổi, cho phép những thay đổi sẽ được theo dõi và dễ dàng quay ngược lại nếu cần. Các thay đổi được đệ trình một cách cục bộ có thể sau đó được đệ trình cho dự án ngược lên dòng trên để đưa vào trong phát hành tiếp sau.</p><p align="JUSTIFY" style="margin-bottom: 0cm"> <font color="rgb(255, 0, 0);">Một khi người đóng góp thỏa mãn với những thay đổi của họ đáng được xem xét đối với những người duy trì dự án, thì một yêu cầu kéo sẽ phát sinh</font>.</p><p align="JUSTIFY" style="margin-bottom: 0cm"> <b>Việc phát sinh một yêu cầu kéo</b></p><p align="JUSTIFY" style="margin-bottom: 0cm"> Phương pháp cho việc nảy sinh một yêu cầu kéo có thể khác nhau giữa các dự án, nên hãy chắc chắn rằng các dự án được viết tài liệu cho các chi tiết. Tuy nhiên, các dự án sử dụng GitHub sẽ thường sử dụng các công cụ của riêng GitHub cho việc điều khiển các yêu cầu kéo. Một tiến trình công việc chung cho việc đệ trình một yêu cầu kéo với GitHub có thể trông giống như thế này:</p><ol> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Tạo/Đăng nhập vào tài khoản GitHub của bạn</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Đi tới trang cho kho mã mà bạn muốn đóng góp tới (“ngược lên dòng trên”)</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> “Rẽ nhanh” kho (điều này tạo ra một bản sao cho tài khoản</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> GitHub của bạn Tạo một bản sao cục bộ rẽ nhánh của bạn với <b>git clone</b></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Tạo một nhánh cục bộ cho những thay đổi của bạn</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Thực hiện các thay đổi của bạn và đệ trình chúng tới nhánh cục bộ của bạn với <b>git commit</b>, đảm bảo đưa vào một thông điệp mô tả đệ trình</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Đẩy nhánh đó tới rẽ nhánh GitHub của bạn bằng việc sử dụng <b>git push</b></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Đi tới trang cho kho ngược lên dòng trên đi tới thẻ tab các yêu cầu kéo</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Nháy vào núm “New Pull Request” (Yêu cầu Kéo Mới)</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Chọn nhánh mà bạn muốn đệ trình, và viết một tóm tắt những gì thay đổi của bạn giải thích những gì nó có ý định làm và cách mà nó được triển khai</p> </li></ol><p align="JUSTIFY" style="margin-bottom: 0cm"> Các dự án khác có thể xử trí các yêu cầu kéo ngoài github, ví dụ Moodle quản lý các yêu cầu kéo như các thẻ trong trình theo dõi lỗi Jira. Tuy nhiên, bạn sẽ luôn cần phải đẩy các thay đổi tới một kho có khả năng truy cập công khai cho mã của bạn sẽ truy cập được đối với dự án, nên việc có một tài khoản trên một site như GitHub hoặc Bitbucket là một ý tưởng tốt.</p><p align="JUSTIFY" style="margin-bottom: 0cm"> &nbsp;</p><p align="JUSTIFY" style="margin-bottom: 0cm"> <a name="introduction"></a> <span style="background: rgb(255, 255, 0);">A pull request is a method of submitting contributions to an <a href="http://oss-watch.ac.uk/resources/odm">open development</a> project. It is often the preferred way of submitting contributions to a project using a distributed <a href="http://oss-watch.ac.uk/resources/versioncontrol">version control system</a> (DVCS) such as <a href="http://git-scm.org/">Git</a>. A pull request occurs when a developer asks for changes committed to an external repository to be considered for inclusion in a project’s main repository.</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">It is important to note that “pull requests” are a workflow method, and are not a feature of the version control system itself. This document will provide a simple overview of pull requests and how they are cre-ated, using the Git version control system and <a href="http://github.com/">GitHub</a> hosting site as examples.</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <a name="making-a-change"></a> <span style="background: rgb(255, 255, 0);">Making a change</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">When contributing to an open source project using a DVCS, you will have a copy or “clone” of the source code repository in your local development environment. Here, you can make your changes and commit them locally to cre-ate a revision history, allowing changes to be tracked and easily rolled back if required. Changes committed locally can then be submitted to the upstream project for inclusion in the next release.</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Once the contributor is satisfied that their changes are worthy of consideration by the project maintainers, a pull request is raised.</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <a name="raising-a-pull-request"></a> <span style="background: rgb(255, 255, 0);">Raising a Pull Request</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">The method for rasing a pull request may differ between projects, so be sure to check the projects documentation for details. However, projects using GitHub will often use GitHub’s own tools for handling pull requests. A common workflow for submitting a pull request with GitHub would look like this:</span></p><ol> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Cre-ate/Log in to your GitHub account </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Go to the page for the code respository you want to contribute to (the “upstream”) </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">“Fork” the repository (this cre-ates a clone to your GitHub account) </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Cre-ate a local clone of your fork with </span><code class="western"><span style="background: rgb(255, 255, 0);">git clone</span></code><span style="background: rgb(255, 255, 0);"> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Cre-ate a local branch for your changes </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Make your changes and commit them to your local branch with </span><code class="western"><span style="background: rgb(255, 255, 0);">git commit</span></code><span style="background: rgb(255, 255, 0);">, ensuring to include a descriptive commit message </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Push the branch to your GitHub fork using </span><code class="western"><span style="background: rgb(255, 255, 0);">git push</span></code><span style="background: rgb(255, 255, 0);"> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Go to the page for the upstream repository go to the pull requests tab </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Click the “New Pull Request” Button </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Se-lect the branch you want to submit, and write a summary of what your change explaining what it is intended to do and how it is implemented </span></p> </li></ol><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Other projects may handle pull requests outside of github, for example Moodle manages pull requests as tickets in its Jira bug tracker. However, you’ll always need to push your changes to a publically accessible repository for your code to be accessible by the project, so having an account on a site like GitHub or Bitbucket is a good idea.</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <b>Áp dụng một yêu cầu kéo </b></p><p align="JUSTIFY" style="margin-bottom: 0cm"> Một khi một yêu cầu kéo đã được một người đóng góp đệ trình, thì nó sau đó là trách nhiệm của những người duy trì dự án để đánh giá và, ở những nơi phù hợp, trộn nó vào trong kho ngược lên dòng trên. Các dự án khác nhau có các tiếp cận khác nhau đối với việc rà soát lại và áp dụng các yêu cầu kéo. Tuy nhiên, chúng tất cả có một số bước chung:</p><ul> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Nhanh chóng đánh giá giá trị của những thay đổi</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Chuẩn bị nhắc và ý kiến phản hồi chính xác cho người đóng góp (yêu cầu một sự đệ trình lại ở những nơi phù hợp)</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Kiểm tra mã được thay đổi và chạy bất kỳ bộ kiểm thử nào đối với nó</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Báo cáo bất kỳ vấn đề gì cho người đóng góp và yêu cầu một sự đệ trình lại</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Kéo các thay đổi đó vào mã ngược lên dòng trên</p> </li></ul><p align="JUSTIFY" style="margin-bottom: 0cm"> Các lập trình viên có kỹ năng có thể đọc ác khác biệt (các trình bày văn bản của các thay đổi được thực hiện) và hiểu các tác động của chúng mà không thực sự áp dụng chúng cho kho mã. GitHub đưa ra một kiểu nhìn các khác biệt bằng việc mô tả từng yêu cầu kéo để tiến hành điều này dễ hơn.</p><p align="JUSTIFY" style="margin-bottom: 0cm"> &nbsp;</p><p align="JUSTIFY" style="margin-bottom: 0cm"> <a name="applying-a-pull-request"></a> <span style="background: rgb(255, 255, 0);">Applying a Pull Request</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Once a pull request has been submitted by a contributor, it is then the responsibility of the project maintainers to evaluate and, whe-re appropriate, merge it into the upstream respository. Different projects have different approaches to reviewing and applying pull requests. However, they all have some common steps:</span></p><ul> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Quickly evaluate the value of the changes </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Prepare prompt and accurate feedback to the contributor (requesting a resubmission whe-re appropriate) </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Check out the changed code and run any test suites against it </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Report any problems to the contributor and request a resubmission </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Pull the changes into the upstream code </span></p> </li></ul><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Skilled developers can read diffs (textual representations of the changes made) and understand their implications without actually applying them to the code base. GitHub provides a view of the diff describing each pull request to make this easier. This makes it easy to provide rapid feedback to the contributor. Should the project maintainer feel that the change looks like a solid contribution, they will check out the branch for which the pull is being requested to their local development environment and test it. Since a good contribution will already have undergone extensive testing, this should be a simple matter for the maintainer. However, mistakes can be made and so further testing should always be carried out.</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Once a pull request has been approved the maintainer will pull it into the requested branch of the upstream repository, either using GitHub, a </span><code class="western"><span style="background: rgb(255, 255, 0);">git merge</span></code><span style="background: rgb(255, 255, 0);"> or </span><code class="western"><span style="background: rgb(255, 255, 0);">git pull</span></code><span style="background: rgb(255, 255, 0);"> command. This will make the code available in the public version on the upstream repository. If this change is assocaited with an ticket in the issue tracker, the ticket should then be up-dated. GitHub allows this to happen automatically by referencing the issue in the commit message.</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> Điều này làm cho nó dễ dàng cung cấp các ý kiến phản hồi nhanh cho người đóng góp. Người duy trì dự án nếu cảm thấy rằng thay đổi đó trông giống như một đóng góp cứng cỏi, họ sẽ kiểm tra nhánh theo đó sự kéo đang được yêu cầu cho môi trường phát triển cục bộ của chúng và kiểm thử nó. Vì một sự đóng góp tốt sẽ đi qua rồi việc kiểm thử tăng cường, điều này nên là một vấn đề đơn giản cho người duy trì. Tuy nhiên, các sai sót có thể được thực hiện và vì thế việc kiểm thử tiếp sau nên luôn được triển khai.</p><p align="JUSTIFY" style="margin-bottom: 0cm"> Một khi một yêu cầu kéo từng được phê chuẩn thì người duy trì sẽ kéo nó vào nhánh được yêu cầu của kho ngược lên dòng trên, hoặc bằng việc sử dụng GitHub, một lệnh <b>git merge</b> hoặc <b>git pull</b>. Điều này sẽ làm cho mã sẵn sàng trong phiên bản công khai trong kho ngược lên dòng trên. Nếu sự thay đổi này có liên quan tới một thẻ (ticket) trong trình theo dõi vấn đề, thì thẻ đó sau đó sẽ được cập nhật. GitHub cho phép điều này xảy ra một cách tự động bằng việc tham chiếu vấn đề đó trong một thông điệp đệ trình.</p><p align="JUSTIFY" style="margin-bottom: 0cm"> <b>Điều đó có thực sự đơn giản?</b></p><p align="JUSTIFY" style="margin-bottom: 0cm"> Điều quan trọng rằng những thay đổi được thực hiện đối với phiên bản mới nhất của mã trong sự phát triển. Trong git, điều này thường là nhánh được gọi là “master” (chủ). Nếu có các phiên bản ổn định vẫn nhận được các bản sửa lỗi và cập nhật, thì bạn có thể muốn xem xét liệu bạn có nên cũng đệ trình một yêu cầu kéo cho những thay đổi cả bạn đối với các phiên bản đó hay không, chúng sẽ thường có các nhánh riêng của chúng trong kiểm soát phiên bản ngược lên dòng trên. Nếu những thay đổi đó sửa một lỗi mà <i>chỉ</i> xảy ra trong một phiên bản cũ hơn, thì sau đó có thể là phù hợp để chỉ đệ trình một yêu cầu kéo đố với phiên bản cũ hơn đó.</p><p align="JUSTIFY" style="margin-bottom: 0cm"> Cũng quan trọng là người đóng góp đảm bảo rằng những thay đổi được thực hiện tuân thủ với bất kỳ sự làm tài liệu và các tiêu chuẩn viết mã nào được dự án áp dụng. Cũng là sống còn để kiểm thử kỹ những thay đổi đối với bất kỳ bộ kiểm thử nào mà dự án đưa ra. Cuối cùng, từng đóng góp nên được viết thành tài liệu rõ rằng với ít nhất các chi tiết về:</p><ul> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Nó có ý định làm gì</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Nó được triển khai thến nào</p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> Nó được sử dụng thế nào</p> </li></ul><p align="JUSTIFY" style="margin-bottom: 0cm"> Để biết thêm về phân tích lý lẽ đằng sau điều này và tầm quan trọng của việc đệ trình các thay đổi của bạn ngược lên dòng trên, hãy đọc các phần <a href="http://oss-watch.ac.uk/resources/softwarepatch#is-it-really-that-simple">Điều đó có thực sự đơn giản?</a> và <a href="http://oss-watch.ac.uk/resources/softwarepatch#why-should-i-contribute-a-patch">Vì sao tôi nên đóng góp một bản vá?</a></p><p align="JUSTIFY" style="margin-bottom: 0cm"> Đọc thêm</p><p align="JUSTIFY" style="margin-bottom: 0cm"> Các liên kết:</p><ul> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="https://help.github.com/articles/fork-a-repo">Trợ giúp của GitHub - Rẽ nhánh một kho</a></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="https://help.github.com/articles/using-pull-requests">Trợ giúp của GitHub - Sử dụng các yêu cầu kéo</a></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="http://docs.moodle.org/dev/Process">Quy trình phát triển của Moodle</a></p> </li></ul><p align="JUSTIFY" style="margin-bottom: 0cm"> Thông tin liên quan từ OSS Watch:</p><ul> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="http://oss-watch.ac.uk/resources/releasemanagement">Quản lý phát hành trong các dự án phần mềm nguồn mở</a></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="http://oss-watch.ac.uk/resources/cla">Các thỏa thuận giấy phép của người đóng góp</a></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="http://oss-watch.ac.uk/resources/versioncontrol">Kiểm soát phiên bản là gì? Vì sao sự cần mẫn siêng năm là quan trọng?</a></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="http://oss-watch.ac.uk/resources/contributing">Bạn có thể đóng góp mã cho một dự án nguồn mở?</a></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="http://oss-watch.ac.uk/resources/howtobuildcommunity">Làm thế nào để xây dựng một cộng đồng nguồn mở</a></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="http://oss-watch.ac.uk/resources/rolesinopensource">Các vai trò trong các dự án nguồn mở</a></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="http://oss-watch.ac.uk/resources/softwarepatch">Bản vá phần mềm là gì?</a></p> </li></ul><p align="JUSTIFY" style="margin-bottom: 0cm"> <a name="is-it-really-that-simple"></a> <span style="background: rgb(255, 255, 0);">Is it really that simple?</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">It is important that changes are made against the latest version of the code in development. In git, this is usually the branch called “master”. If there are stable releases still receiving bug fixes and up-dates, you may want to consider whether you should also submit a pull request for your changes against those versions, which will often have their own branches in the upstream version control. If the changes fix a bug which </span><em><span style="background: rgb(255, 255, 0);">only</span></em><span style="background: rgb(255, 255, 0);"> occurs in an older version, then it may be appropriate to only submit a pull request against the older version.</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">It is also important that the contributor ensures that the changes made comply with any documentation and coding standards adopted by the project. It is also critical to thoroughly test changes against any test suites the project provides. Finally, each contribution should be clearly documented with, at a minimum, details on:</span></p><ul> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">What it is intended to do </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">How it is implemented </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">How it is used </span></p> </li></ul><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">For more about the rationale behind this and the importance of submitting your changes upstream, read the <a href="http://oss-watch.ac.uk/resources/softwarepatch#is-it-really-that-simple">Is It Really That Simple?</a> and <a href="http://oss-watch.ac.uk/resources/softwarepatch#why-should-i-contribute-a-patch">Why Should I Contribute A Patch?</a> sections of our breifing, <a href="http://oss-watch.ac.uk/resources/softwarepatch">What is a Software Patch?</a></span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <a name="further-reading"></a> <span style="background: rgb(255, 255, 0);">Further reading</span></p><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Links:</span></p><ul> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="https://help.github.com/articles/fork-a-repo">GitHub help - Fork a Repo</a> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="https://help.github.com/articles/using-pull-requests">GitHub help - Using Pull Requests</a> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="http://docs.moodle.org/dev/Process">Moodle Development Process</a> </span></p> </li></ul><p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);">Related information f-rom OSS Watch:</span></p><ul> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="http://oss-watch.ac.uk/resources/releasemanagement">Release management in open source software projects</a> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="http://oss-watch.ac.uk/resources/cla">Contributor Licence Agreements</a> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="http://oss-watch.ac.uk/resources/versioncontrol">What is version control? Why is it important for due diligence?</a> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="http://oss-watch.ac.uk/resources/contributing">Can you contribute code to an open source project?</a> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="http://oss-watch.ac.uk/resources/howtobuildcommunity">How to build an open source community</a> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="http://oss-watch.ac.uk/resources/rolesinopensource">Roles in open source projects</a> </span></p> </li> <li> <p align="JUSTIFY" style="margin-bottom: 0cm"> <span style="background: rgb(255, 255, 0);"><a href="http://oss-watch.ac.uk/resources/softwarepatch">What is a Software Patch?</a> </span></p> </li></ul><p align="JUSTIFY" style="margin-bottom: 0cm"> Dịch: Lê Trung Nghĩa</p><p align="JUSTIFY" style="margin-bottom: 0cm"> <a href="mailto:letrungnghia.foss@gmail.com">letrungnghia.foss@gmail.com</a></p>
		</div>
	</div>
	<div id="footer" class="clearfix">
		<div id="url">
			<strong>URL của bản tin này: </strong><a href="https://letrungnghia.mangvn.org/savefile/Philosophy/Mot-yeu-cau-keo-la-gi-4785.html" title="Một yêu cầu kéo là gì?">https://letrungnghia.mangvn.org/savefile/Philosophy/Mot-yeu-cau-keo-la-gi-4785.html</a>

		</div>
		<div class="clear"></div>
		<div class="copyright">
			&copy; Blog FOSS by Lê Trung Nghĩa
		</div>
		<div id="contact">
			<a href="mailto:webmaster@vinades.vn">webmaster@vinades.vn</a>
		</div>
	</div>
</div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a onclick="timeoutsesscancel();" href="https://letrungnghia.mangvn.org/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
<div id="run_cronjobs" style="visibility:hidden;display:none;"><img alt="cron" src="/index.php?second=cronjobs&amp;p=y5tMog17" width="1" height="1" /></div>
<script src="https://letrungnghia.mangvn.org/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="news",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=7,nv_my_abbr="+07",nv_cookie_prefix="nv4c_Cgoz2",nv_check_pass_mstime=1738000,nv_area_admin=0,nv_safemode=0,theme_responsive=0,nv_recaptcha_ver=2,nv_recaptcha_sitekey="6LcNwC8UAAAAAMm8ZTYNygweLUQtOU0IapbDRk69",nv_recaptcha_type="image",XSSsanitize=1;</script>
<script src="https://letrungnghia.mangvn.org/assets/js/language/vi.js"></script>
<script src="https://letrungnghia.mangvn.org/assets/js/DOMPurify/purify3.js"></script>
<script src="https://letrungnghia.mangvn.org/assets/js/global.js"></script>
<script src="https://letrungnghia.mangvn.org/assets/js/site.js"></script>
<script src="https://letrungnghia.mangvn.org/themes/default/js/news.js"></script>
<script src="https://letrungnghia.mangvn.org/themes/default/js/main.js"></script>
<script src="https://letrungnghia.mangvn.org/themes/default/js/custom.js"></script>
<script type="application/ld+json">
        {
            "@context": "https://schema.org",
            "@type": "Organization",
            "url": "https://letrungnghia.mangvn.org",
            "logo": "https://letrungnghia.mangvn.org/uploads/letrungnghia/le-trung-nghia.png"
        }
        </script>
<script src="https://letrungnghia.mangvn.org/themes/default/js/bootstrap.min.js"></script>
</body>
</html>