 4cfad5ae0f
			
		
	
	
		4cfad5ae0f
		
	
	
	
	
		
			
			- 全新ui - 全面优化websocket逻辑,提高数字人和ui连接的稳定性及资源开销 - 全面优化唤醒逻辑,提供稳定的普通唤醒模式和前置词唤醒模式 - 优化拾音质量,支持多声道麦克风拾音 - 优化自动播放服务器的对接机制,提供稳定和兼容旧版ue工程的对接模式 - 数字人接口输出机器人表情,以适应新fay ui及单片机的数字人表情输出 - 使用更高级的音频时长计算方式,可以更精准控制音频播放完成后的逻辑 - 修复点击关闭按钮会导致程序退出的bug - 修复没有麦克风的设备开启麦克风会出错的问题 - 为服务器主机地址提供配置项,以方便服务器部署
		
			
				
	
	
		
			625 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			625 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html>
 | |
| <!-- Created by GNU Texinfo 7.0.1, https://www.gnu.org/software/texinfo/ -->
 | |
| <head>
 | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 | |
| <title>Using Git to develop FFmpeg</title>
 | |
| 
 | |
| <meta name="description" content="Using Git to develop FFmpeg">
 | |
| <meta name="keywords" content="Using Git to develop FFmpeg">
 | |
| <meta name="resource-type" content="document">
 | |
| <meta name="distribution" content="global">
 | |
| <meta name="Generator" content="makeinfo">
 | |
| <meta name="viewport" content="width=device-width,initial-scale=1">
 | |
| 
 | |
| <link href="#SEC_Contents" rel="contents" title="Table of Contents">
 | |
| <style type="text/css">
 | |
| <!--
 | |
| div.example {margin-left: 3.2em}
 | |
| ul.mark-bullet {list-style-type: disc}
 | |
| ul.toc-numbered-mark {list-style: none}
 | |
| -->
 | |
| </style>
 | |
| 
 | |
| 
 | |
| </head>
 | |
| 
 | |
| <body lang="en">
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="top-level-extent" id="SEC_Top">
 | |
| 
 | |
| 
 | |
| <div class="element-contents" id="SEC_Contents">
 | |
| <h2 class="contents-heading">Table of Contents</h2>
 | |
| 
 | |
| <div class="contents">
 | |
| 
 | |
| <ul class="toc-numbered-mark">
 | |
|   <li><a id="toc-Introduction" href="#Introduction">1 Introduction</a></li>
 | |
|   <li><a id="toc-Basics-Usage" href="#Basics-Usage">2 Basics Usage</a>
 | |
|   <ul class="toc-numbered-mark">
 | |
|     <li><a id="toc-Get-Git" href="#Get-Git">2.1 Get Git</a></li>
 | |
|     <li><a id="toc-Cloning-the-source-tree" href="#Cloning-the-source-tree">2.2 Cloning the source tree</a></li>
 | |
|     <li><a id="toc-Updating-the-source-tree-to-the-latest-revision-1" href="#Updating-the-source-tree-to-the-latest-revision-1">2.3 Updating the source tree to the latest revision</a></li>
 | |
|     <li><a id="toc-Rebasing-your-local-branches" href="#Rebasing-your-local-branches">2.4 Rebasing your local branches</a></li>
 | |
|     <li><a id="toc-Adding_002fremoving-files_002fdirectories" href="#Adding_002fremoving-files_002fdirectories">2.5 Adding/removing files/directories</a></li>
 | |
|     <li><a id="toc-Showing-modifications" href="#Showing-modifications">2.6 Showing modifications</a></li>
 | |
|     <li><a id="toc-Inspecting-the-changelog" href="#Inspecting-the-changelog">2.7 Inspecting the changelog</a></li>
 | |
|     <li><a id="toc-Checking-source-tree-status" href="#Checking-source-tree-status">2.8 Checking source tree status</a></li>
 | |
|     <li><a id="toc-Committing" href="#Committing">2.9 Committing</a></li>
 | |
|     <li><a id="toc-Writing-a-commit-message" href="#Writing-a-commit-message">2.10 Writing a commit message</a></li>
 | |
|     <li><a id="toc-Preparing-a-patchset" href="#Preparing-a-patchset">2.11 Preparing a patchset</a></li>
 | |
|     <li><a id="toc-Sending-patches-for-review" href="#Sending-patches-for-review">2.12 Sending patches for review</a></li>
 | |
|     <li><a id="toc-Renaming_002fmoving_002fcopying-files-or-contents-of-files" href="#Renaming_002fmoving_002fcopying-files-or-contents-of-files">2.13 Renaming/moving/copying files or contents of files</a></li>
 | |
|   </ul></li>
 | |
|   <li><a id="toc-Git-configuration" href="#Git-configuration">3 Git configuration</a>
 | |
|   <ul class="toc-numbered-mark">
 | |
|     <li><a id="toc-Personal-Git-installation" href="#Personal-Git-installation">3.1 Personal Git installation</a></li>
 | |
|     <li><a id="toc-Repository-configuration" href="#Repository-configuration">3.2 Repository configuration</a></li>
 | |
|   </ul></li>
 | |
|   <li><a id="toc-FFmpeg-specific" href="#FFmpeg-specific">4 FFmpeg specific</a>
 | |
|   <ul class="toc-numbered-mark">
 | |
|     <li><a id="toc-Reverting-broken-commits" href="#Reverting-broken-commits">4.1 Reverting broken commits</a></li>
 | |
|     <li><a id="toc-Pushing-changes-to-remote-trees" href="#Pushing-changes-to-remote-trees">4.2 Pushing changes to remote trees</a></li>
 | |
|     <li><a id="toc-Finding-a-specific-svn-revision" href="#Finding-a-specific-svn-revision">4.3 Finding a specific svn revision</a></li>
 | |
|   </ul></li>
 | |
|   <li><a id="toc-gpg-key-generation" href="#gpg-key-generation">5 gpg key generation</a></li>
 | |
|   <li><a id="toc-Pre_002dpush-checklist" href="#Pre_002dpush-checklist">6 Pre-push checklist</a></li>
 | |
|   <li><a id="toc-Server-Issues" href="#Server-Issues">7 Server Issues</a></li>
 | |
| </ul>
 | |
| </div>
 | |
| </div>
 | |
| <div class="chapter-level-extent" id="Introduction">
 | |
| <h2 class="chapter">1 Introduction</h2>
 | |
| 
 | |
| <p>This document aims in giving some quick references on a set of useful Git
 | |
| commands. You should always use the extensive and detailed documentation
 | |
| provided directly by Git:
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git --help
 | |
| man git
 | |
| </pre></div>
 | |
| 
 | |
| <p>shows you the available subcommands,
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git <command> --help
 | |
| man git-<command>
 | |
| </pre></div>
 | |
| 
 | |
| <p>shows information about the subcommand <command>.
 | |
| </p>
 | |
| <p>Additional information could be found on the
 | |
| <a class="url" href="http://gitref.org">Git Reference</a> website.
 | |
| </p>
 | |
| <p>For more information about the Git project, visit the
 | |
| <a class="url" href="http://git-scm.com/">Git website</a>.
 | |
| </p>
 | |
| <p>Consult these resources whenever you have problems, they are quite exhaustive.
 | |
| </p>
 | |
| <p>What follows now is a basic introduction to Git and some FFmpeg-specific
 | |
| guidelines to ease the contribution to the project.
 | |
| </p>
 | |
| </div>
 | |
| <div class="chapter-level-extent" id="Basics-Usage">
 | |
| <h2 class="chapter">2 Basics Usage</h2>
 | |
| 
 | |
| <ul class="mini-toc">
 | |
| <li><a href="#Get-Git" accesskey="1">Get Git</a></li>
 | |
| <li><a href="#Cloning-the-source-tree" accesskey="2">Cloning the source tree</a></li>
 | |
| <li><a href="#Updating-the-source-tree-to-the-latest-revision-1" accesskey="3">Updating the source tree to the latest revision</a></li>
 | |
| <li><a href="#Rebasing-your-local-branches" accesskey="4">Rebasing your local branches</a></li>
 | |
| <li><a href="#Adding_002fremoving-files_002fdirectories" accesskey="5">Adding/removing files/directories</a></li>
 | |
| <li><a href="#Showing-modifications" accesskey="6">Showing modifications</a></li>
 | |
| <li><a href="#Inspecting-the-changelog" accesskey="7">Inspecting the changelog</a></li>
 | |
| <li><a href="#Checking-source-tree-status" accesskey="8">Checking source tree status</a></li>
 | |
| <li><a href="#Committing" accesskey="9">Committing</a></li>
 | |
| <li><a href="#Writing-a-commit-message">Writing a commit message</a></li>
 | |
| <li><a href="#Preparing-a-patchset">Preparing a patchset</a></li>
 | |
| <li><a href="#Sending-patches-for-review">Sending patches for review</a></li>
 | |
| <li><a href="#Renaming_002fmoving_002fcopying-files-or-contents-of-files">Renaming/moving/copying files or contents of files</a></li>
 | |
| </ul>
 | |
| <div class="section-level-extent" id="Get-Git">
 | |
| <h3 class="section">2.1 Get Git</h3>
 | |
| 
 | |
| <p>You can get Git from <a class="url" href="http://git-scm.com/">http://git-scm.com/</a>
 | |
| Most distribution and operating system provide a package for it.
 | |
| </p>
 | |
| 
 | |
| </div>
 | |
| <div class="section-level-extent" id="Cloning-the-source-tree">
 | |
| <h3 class="section">2.2 Cloning the source tree</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git clone https://git.ffmpeg.org/ffmpeg.git <target>
 | |
| </pre></div>
 | |
| 
 | |
| <p>This will put the FFmpeg sources into the directory <var class="var"><target></var>.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git clone git@source.ffmpeg.org:ffmpeg <target>
 | |
| </pre></div>
 | |
| 
 | |
| <p>This will put the FFmpeg sources into the directory <var class="var"><target></var> and let
 | |
| you push back your changes to the remote repository.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git clone gil@ffmpeg.org:ffmpeg-web <target>
 | |
| </pre></div>
 | |
| 
 | |
| <p>This will put the source of the FFmpeg website into the directory
 | |
| <var class="var"><target></var> and let you push back your changes to the remote repository.
 | |
| (Note that <var class="var">gil</var> stands for GItoLite and is not a typo of <var class="var">git</var>.)
 | |
| </p>
 | |
| <p>If you don’t have write-access to the ffmpeg-web repository, you can
 | |
| create patches after making a read-only ffmpeg-web clone:
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git clone git://ffmpeg.org/ffmpeg-web <target>
 | |
| </pre></div>
 | |
| 
 | |
| <p>Make sure that you do not have Windows line endings in your checkouts,
 | |
| otherwise you may experience spurious compilation failures. One way to
 | |
| achieve this is to run
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git config --global core.autocrlf false
 | |
| </pre></div>
 | |
| 
 | |
| 
 | |
| <a class="anchor" id="Updating-the-source-tree-to-the-latest-revision"></a></div>
 | |
| <div class="section-level-extent" id="Updating-the-source-tree-to-the-latest-revision-1">
 | |
| <h3 class="section">2.3 Updating the source tree to the latest revision</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git pull (--rebase)
 | |
| </pre></div>
 | |
| 
 | |
| <p>pulls in the latest changes from the tracked branch. The tracked branch
 | |
| can be remote. By default the master branch tracks the branch master in
 | |
| the remote origin.
 | |
| </p>
 | |
| <div class="float">
 | |
| <p><code class="command">--rebase</code> (see below) is recommended.
 | |
| </p><div class="type-number-float"><p><strong class="strong">IMPORTANT
 | |
| </strong></p></div></div>
 | |
| </div>
 | |
| <div class="section-level-extent" id="Rebasing-your-local-branches">
 | |
| <h3 class="section">2.4 Rebasing your local branches</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git pull --rebase
 | |
| </pre></div>
 | |
| 
 | |
| <p>fetches the changes from the main repository and replays your local commits
 | |
| over it. This is required to keep all your local changes at the top of
 | |
| FFmpeg’s master tree. The master tree will reject pushes with merge commits.
 | |
| </p>
 | |
| 
 | |
| </div>
 | |
| <div class="section-level-extent" id="Adding_002fremoving-files_002fdirectories">
 | |
| <h3 class="section">2.5 Adding/removing files/directories</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git add [-A] <filename/dirname>
 | |
| git rm [-r] <filename/dirname>
 | |
| </pre></div>
 | |
| 
 | |
| <p>Git needs to get notified of all changes you make to your working
 | |
| directory that makes files appear or disappear.
 | |
| Line moves across files are automatically tracked.
 | |
| </p>
 | |
| 
 | |
| </div>
 | |
| <div class="section-level-extent" id="Showing-modifications">
 | |
| <h3 class="section">2.6 Showing modifications</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git diff <filename(s)>
 | |
| </pre></div>
 | |
| 
 | |
| <p>will show all local modifications in your working directory as unified diff.
 | |
| </p>
 | |
| 
 | |
| </div>
 | |
| <div class="section-level-extent" id="Inspecting-the-changelog">
 | |
| <h3 class="section">2.7 Inspecting the changelog</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git log <filename(s)>
 | |
| </pre></div>
 | |
| 
 | |
| <p>You may also use the graphical tools like <code class="command">gitview</code> or <code class="command">gitk</code>
 | |
| or the web interface available at <a class="url" href="http://source.ffmpeg.org/">http://source.ffmpeg.org/</a>.
 | |
| </p>
 | |
| </div>
 | |
| <div class="section-level-extent" id="Checking-source-tree-status">
 | |
| <h3 class="section">2.8 Checking source tree status</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git status
 | |
| </pre></div>
 | |
| 
 | |
| <p>detects all the changes you made and lists what actions will be taken in case
 | |
| of a commit (additions, modifications, deletions, etc.).
 | |
| </p>
 | |
| 
 | |
| </div>
 | |
| <div class="section-level-extent" id="Committing">
 | |
| <h3 class="section">2.9 Committing</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git diff --check
 | |
| </pre></div>
 | |
| 
 | |
| <p>to double check your changes before committing them to avoid trouble later
 | |
| on. All experienced developers do this on each and every commit, no matter
 | |
| how small.
 | |
| </p>
 | |
| <p>Every one of them has been saved from looking like a fool by this many times.
 | |
| It’s very easy for stray debug output or cosmetic modifications to slip in,
 | |
| please avoid problems through this extra level of scrutiny.
 | |
| </p>
 | |
| <p>For cosmetics-only commits you should get (almost) empty output from
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git diff -w -b <filename(s)>
 | |
| </pre></div>
 | |
| 
 | |
| <p>Also check the output of
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git status
 | |
| </pre></div>
 | |
| 
 | |
| <p>to make sure you don’t have untracked files or deletions.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git add [-i|-p|-A] <filenames/dirnames>
 | |
| </pre></div>
 | |
| 
 | |
| <p>Make sure you have told Git your name, email address and GPG key
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git config --global user.name "My Name"
 | |
| git config --global user.email my@email.invalid
 | |
| git config --global user.signingkey ABCDEF0123245
 | |
| </pre></div>
 | |
| 
 | |
| <p>Enable signing all commits or use -S
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git config --global commit.gpgsign true
 | |
| </pre></div>
 | |
| 
 | |
| <p>Use <samp class="option">--global</samp> to set the global configuration for all your Git checkouts.
 | |
| </p>
 | |
| <p>Git will select the changes to the files for commit. Optionally you can use
 | |
| the interactive or the patch mode to select hunk by hunk what should be
 | |
| added to the commit.
 | |
| </p>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git commit
 | |
| </pre></div>
 | |
| 
 | |
| <p>Git will commit the selected changes to your current local branch.
 | |
| </p>
 | |
| <p>You will be prompted for a log message in an editor, which is either
 | |
| set in your personal configuration file through
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git config --global core.editor
 | |
| </pre></div>
 | |
| 
 | |
| <p>or set by one of the following environment variables:
 | |
| <var class="var">GIT_EDITOR</var>, <var class="var">VISUAL</var> or <var class="var">EDITOR</var>.
 | |
| </p>
 | |
| </div>
 | |
| <div class="section-level-extent" id="Writing-a-commit-message">
 | |
| <h3 class="section">2.10 Writing a commit message</h3>
 | |
| 
 | |
| <p>Log messages should be concise but descriptive.
 | |
| </p>
 | |
| <p>The first line must contain the context, a colon and a very short
 | |
| summary of what the commit does. Details can be added, if necessary,
 | |
| separated by an empty line. These details should not exceed 60-72 characters
 | |
| per line, except when containing code.
 | |
| </p>
 | |
| <p>Example of a good commit message:
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">avcodec/cbs: add a helper to read extradata within packet side data
 | |
| 
 | |
| Using ff_cbs_read() on the raw buffer will not parse it as extradata,
 | |
| resulting in parsing errors for example when handling ISOBMFF avcC.
 | |
| This helper works around that.
 | |
| </pre></div>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">ptr might be NULL
 | |
| </pre></div>
 | |
| 
 | |
| <p>If the summary on the first line is not enough, in the body of the message,
 | |
| explain why you made a change, what you did will be obvious from the changes
 | |
| themselves most of the time. Saying just "bug fix" or "10l" is bad. Remember
 | |
| that people of varying skill levels look at and educate themselves while
 | |
| reading through your code. Don’t include filenames in log messages except in
 | |
| the context, Git provides that information.
 | |
| </p>
 | |
| <p>If the commit fixes a registered issue, state it in a separate line of the
 | |
| body: <code class="code">Fix Trac ticket #42.</code>
 | |
| </p>
 | |
| <p>The first line will be used to name
 | |
| the patch by <code class="command">git format-patch</code>.
 | |
| </p>
 | |
| <p>Common mistakes for the first line, as seen in <code class="command">git log --oneline</code>
 | |
| include: missing context at the beginning; description of what the code did
 | |
| before the patch; line too long or wrapped to the second line.
 | |
| </p>
 | |
| </div>
 | |
| <div class="section-level-extent" id="Preparing-a-patchset">
 | |
| <h3 class="section">2.11 Preparing a patchset</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git format-patch <commit> [-o directory]
 | |
| </pre></div>
 | |
| 
 | |
| <p>will generate a set of patches for each commit between <var class="var"><commit></var> and
 | |
| current <var class="var">HEAD</var>. E.g.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git format-patch origin/master
 | |
| </pre></div>
 | |
| 
 | |
| <p>will generate patches for all commits on current branch which are not
 | |
| present in upstream.
 | |
| A useful shortcut is also
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git format-patch -n
 | |
| </pre></div>
 | |
| 
 | |
| <p>which will generate patches from last <var class="var">n</var> commits.
 | |
| By default the patches are created in the current directory.
 | |
| </p>
 | |
| </div>
 | |
| <div class="section-level-extent" id="Sending-patches-for-review">
 | |
| <h3 class="section">2.12 Sending patches for review</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git send-email <commit list|directory>
 | |
| </pre></div>
 | |
| 
 | |
| <p>will send the patches created by <code class="command">git format-patch</code> or directly
 | |
| generates them. All the email fields can be configured in the global/local
 | |
| configuration or overridden by command line.
 | |
| Note that this tool must often be installed separately (e.g. <var class="var">git-email</var>
 | |
| package on Debian-based distros).
 | |
| </p>
 | |
| 
 | |
| </div>
 | |
| <div class="section-level-extent" id="Renaming_002fmoving_002fcopying-files-or-contents-of-files">
 | |
| <h3 class="section">2.13 Renaming/moving/copying files or contents of files</h3>
 | |
| 
 | |
| <p>Git automatically tracks such changes, making those normal commits.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">mv/cp path/file otherpath/otherfile
 | |
| git add [-A] .
 | |
| git commit
 | |
| </pre></div>
 | |
| 
 | |
| 
 | |
| </div>
 | |
| </div>
 | |
| <div class="chapter-level-extent" id="Git-configuration">
 | |
| <h2 class="chapter">3 Git configuration</h2>
 | |
| 
 | |
| <p>In order to simplify a few workflows, it is advisable to configure both
 | |
| your personal Git installation and your local FFmpeg repository.
 | |
| </p>
 | |
| <ul class="mini-toc">
 | |
| <li><a href="#Personal-Git-installation" accesskey="1">Personal Git installation</a></li>
 | |
| <li><a href="#Repository-configuration" accesskey="2">Repository configuration</a></li>
 | |
| </ul>
 | |
| <div class="section-level-extent" id="Personal-Git-installation">
 | |
| <h3 class="section">3.1 Personal Git installation</h3>
 | |
| 
 | |
| <p>Add the following to your <samp class="file">~/.gitconfig</samp> to help <code class="command">git send-email</code>
 | |
| and <code class="command">git format-patch</code> detect renames:
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">[diff]
 | |
|         renames = copy
 | |
| </pre></div>
 | |
| 
 | |
| </div>
 | |
| <div class="section-level-extent" id="Repository-configuration">
 | |
| <h3 class="section">3.2 Repository configuration</h3>
 | |
| 
 | |
| <p>In order to have <code class="command">git send-email</code> automatically send patches
 | |
| to the ffmpeg-devel mailing list, add the following stanza
 | |
| to <samp class="file">/path/to/ffmpeg/repository/.git/config</samp>:
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">[sendemail]
 | |
|         to = ffmpeg-devel@ffmpeg.org
 | |
| </pre></div>
 | |
| 
 | |
| </div>
 | |
| </div>
 | |
| <div class="chapter-level-extent" id="FFmpeg-specific">
 | |
| <h2 class="chapter">4 FFmpeg specific</h2>
 | |
| 
 | |
| <ul class="mini-toc">
 | |
| <li><a href="#Reverting-broken-commits" accesskey="1">Reverting broken commits</a></li>
 | |
| <li><a href="#Pushing-changes-to-remote-trees" accesskey="2">Pushing changes to remote trees</a></li>
 | |
| <li><a href="#Finding-a-specific-svn-revision" accesskey="3">Finding a specific svn revision</a></li>
 | |
| </ul>
 | |
| <div class="section-level-extent" id="Reverting-broken-commits">
 | |
| <h3 class="section">4.1 Reverting broken commits</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git reset <commit>
 | |
| </pre></div>
 | |
| 
 | |
| <p><code class="command">git reset</code> will uncommit the changes till <var class="var"><commit></var> rewriting
 | |
| the current branch history.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git commit --amend
 | |
| </pre></div>
 | |
| 
 | |
| <p>allows one to amend the last commit details quickly.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git rebase -i origin/master
 | |
| </pre></div>
 | |
| 
 | |
| <p>will replay local commits over the main repository allowing to edit, merge
 | |
| or remove some of them in the process.
 | |
| </p>
 | |
| <div class="float">
 | |
| <p><code class="command">git reset</code>, <code class="command">git commit --amend</code> and <code class="command">git rebase</code>
 | |
| rewrite history, so you should use them ONLY on your local or topic branches.
 | |
| The main repository will reject those changes.
 | |
| </p><div class="type-number-float"><p><strong class="strong">NOTE
 | |
| </strong></p></div></div>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git revert <commit>
 | |
| </pre></div>
 | |
| 
 | |
| <p><code class="command">git revert</code> will generate a revert commit. This will not make the
 | |
| faulty commit disappear from the history.
 | |
| </p>
 | |
| </div>
 | |
| <div class="section-level-extent" id="Pushing-changes-to-remote-trees">
 | |
| <h3 class="section">4.2 Pushing changes to remote trees</h3>
 | |
| 
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git push origin master --dry-run
 | |
| </pre></div>
 | |
| 
 | |
| <p>Will simulate a push of the local master branch to the default remote
 | |
| (<var class="var">origin</var>). And list which branches and ranges or commits would have been
 | |
| pushed.
 | |
| Git will prevent you from pushing changes if the local and remote trees are
 | |
| out of sync. Refer to <a class="ref" href="#Updating-the-source-tree-to-the-latest-revision">Updating the source tree to the latest revision</a>.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git remote add <name> <url>
 | |
| </pre></div>
 | |
| 
 | |
| <p>Will add additional remote with a name reference, it is useful if you want
 | |
| to push your local branch for review on a remote host.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git push <remote> <refspec>
 | |
| </pre></div>
 | |
| 
 | |
| <p>Will push the changes to the <var class="var"><remote></var> repository.
 | |
| Omitting <var class="var"><refspec></var> makes <code class="command">git push</code> update all the remote
 | |
| branches matching the local ones.
 | |
| </p>
 | |
| </div>
 | |
| <div class="section-level-extent" id="Finding-a-specific-svn-revision">
 | |
| <h3 class="section">4.3 Finding a specific svn revision</h3>
 | |
| 
 | |
| <p>Since version 1.7.1 Git supports ‘<samp class="samp">:/foo</samp>’ syntax for specifying commits
 | |
| based on a regular expression. see man gitrevisions
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git show :/'as revision 23456'
 | |
| </pre></div>
 | |
| 
 | |
| <p>will show the svn changeset ‘<samp class="samp">r23456</samp>’. With older Git versions searching in
 | |
| the <code class="command">git log</code> output is the easiest option (especially if a pager with
 | |
| search capabilities is used).
 | |
| </p>
 | |
| <p>This commit can be checked out with
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git checkout -b svn_23456 :/'as revision 23456'
 | |
| </pre></div>
 | |
| 
 | |
| <p>or for Git < 1.7.1 with
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">git checkout -b svn_23456 $SHA1
 | |
| </pre></div>
 | |
| 
 | |
| <p>where <var class="var">$SHA1</var> is the commit hash from the <code class="command">git log</code> output.
 | |
| </p>
 | |
| 
 | |
| </div>
 | |
| </div>
 | |
| <div class="chapter-level-extent" id="gpg-key-generation">
 | |
| <h2 class="chapter">5 gpg key generation</h2>
 | |
| 
 | |
| <p>If you have no gpg key yet, we recommend that you create a ed25519 based key as it
 | |
| is small, fast and secure. Especially it results in small signatures in git.
 | |
| </p>
 | |
| <div class="example">
 | |
| <pre class="example-preformatted">gpg --default-new-key-algo "ed25519/cert,sign+cv25519/encr" --quick-generate-key "human@server.com"
 | |
| </pre></div>
 | |
| 
 | |
| <p>When generating a key, make sure the email specified matches the email used in git as some sites like
 | |
| github consider mismatches a reason to declare such commits unverified. After generating a key you
 | |
| can add it to the MAINTAINER file and upload it to a keyserver.
 | |
| </p>
 | |
| </div>
 | |
| <div class="chapter-level-extent" id="Pre_002dpush-checklist">
 | |
| <h2 class="chapter">6 Pre-push checklist</h2>
 | |
| 
 | |
| <p>Once you have a set of commits that you feel are ready for pushing,
 | |
| work through the following checklist to doublecheck everything is in
 | |
| proper order. This list tries to be exhaustive. In case you are just
 | |
| pushing a typo in a comment, some of the steps may be unnecessary.
 | |
| Apply your common sense, but if in doubt, err on the side of caution.
 | |
| </p>
 | |
| <p>First, make sure that the commits and branches you are going to push
 | |
| match what you want pushed and that nothing is missing, extraneous or
 | |
| wrong. You can see what will be pushed by running the git push command
 | |
| with <samp class="option">--dry-run</samp> first. And then inspecting the commits listed with
 | |
| <code class="command">git log -p 1234567..987654</code>. The <code class="command">git status</code> command
 | |
| may help in finding local changes that have been forgotten to be added.
 | |
| </p>
 | |
| <p>Next let the code pass through a full run of our test suite.
 | |
| </p>
 | |
| <ul class="itemize mark-bullet">
 | |
| <li><code class="command">make distclean</code>
 | |
| </li><li><code class="command">/path/to/ffmpeg/configure</code>
 | |
| </li><li><code class="command">make fate</code>
 | |
| </li><li>if fate fails due to missing samples run <code class="command">make fate-rsync</code> and retry
 | |
| </li></ul>
 | |
| 
 | |
| <p>Make sure all your changes have been checked before pushing them, the
 | |
| test suite only checks against regressions and that only to some extend. It does
 | |
| obviously not check newly added features/code to be working unless you have
 | |
| added a test for that (which is recommended).
 | |
| </p>
 | |
| <p>Also note that every single commit should pass the test suite, not just
 | |
| the result of a series of patches.
 | |
| </p>
 | |
| <p>Once everything passed, push the changes to your public ffmpeg clone and post a
 | |
| merge request to ffmpeg-devel. You can also push them directly but this is not
 | |
| recommended.
 | |
| </p>
 | |
| </div>
 | |
| <div class="chapter-level-extent" id="Server-Issues">
 | |
| <h2 class="chapter">7 Server Issues</h2>
 | |
| 
 | |
| <p>Contact the project admins at <a class="email" href="mailto:root@ffmpeg.org">root@ffmpeg.org</a> if you have technical
 | |
| problems with the Git server.
 | |
| </p></div>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| </body>
 | |
| </html>
 |