git-howto.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>Using Git to develop FFmpeg</title>
  7. <meta name="description" content="Using Git to develop FFmpeg">
  8. <meta name="keywords" content="Using Git to develop FFmpeg">
  9. <meta name="resource-type" content="document">
  10. <meta name="distribution" content="global">
  11. <meta name="Generator" content="makeinfo">
  12. <meta name="viewport" content="width=device-width,initial-scale=1">
  13. <link href="#SEC_Contents" rel="contents" title="Table of Contents">
  14. <style type="text/css">
  15. <!--
  16. a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
  17. a.summary-letter {text-decoration: none}
  18. blockquote.indentedblock {margin-right: 0em}
  19. div.display {margin-left: 3.2em}
  20. div.example {margin-left: 3.2em}
  21. kbd {font-style: oblique}
  22. pre.display {font-family: inherit}
  23. pre.format {font-family: inherit}
  24. pre.menu-comment {font-family: serif}
  25. pre.menu-preformatted {font-family: serif}
  26. span.nolinebreak {white-space: nowrap}
  27. span.roman {font-family: initial; font-weight: normal}
  28. span.sansserif {font-family: sans-serif; font-weight: normal}
  29. span:hover a.copiable-anchor {visibility: visible}
  30. ul.no-bullet {list-style: none}
  31. -->
  32. </style>
  33. </head>
  34. <body lang="en">
  35. <h1 class="settitle" align="center">Using Git to develop FFmpeg</h1>
  36. <a name="SEC_Top"></a>
  37. <a name="Introduction"></a>
  38. <h2 class="chapter">1 Introduction<span class="pull-right"><a class="anchor hidden-xs" href="#Introduction" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Introduction" aria-hidden="true">TOC</a></span></h2>
  39. <p>This document aims in giving some quick references on a set of useful Git
  40. commands. You should always use the extensive and detailed documentation
  41. provided directly by Git:
  42. </p>
  43. <div class="example">
  44. <pre class="example">git --help
  45. man git
  46. </pre></div>
  47. <p>shows you the available subcommands,
  48. </p>
  49. <div class="example">
  50. <pre class="example">git &lt;command&gt; --help
  51. man git-&lt;command&gt;
  52. </pre></div>
  53. <p>shows information about the subcommand &lt;command&gt;.
  54. </p>
  55. <p>Additional information could be found on the
  56. <a href="http://gitref.org">Git Reference</a> website.
  57. </p>
  58. <p>For more information about the Git project, visit the
  59. <a href="http://git-scm.com/">Git website</a>.
  60. </p>
  61. <p>Consult these resources whenever you have problems, they are quite exhaustive.
  62. </p>
  63. <p>What follows now is a basic introduction to Git and some FFmpeg-specific
  64. guidelines to ease the contribution to the project.
  65. </p>
  66. <a name="Basics-Usage"></a>
  67. <h2 class="chapter">2 Basics Usage<span class="pull-right"><a class="anchor hidden-xs" href="#Basics-Usage" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Basics-Usage" aria-hidden="true">TOC</a></span></h2>
  68. <a name="Get-Git"></a>
  69. <h3 class="section">2.1 Get Git<span class="pull-right"><a class="anchor hidden-xs" href="#Get-Git" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Get-Git" aria-hidden="true">TOC</a></span></h3>
  70. <p>You can get Git from <a href="http://git-scm.com/">http://git-scm.com/</a>
  71. Most distribution and operating system provide a package for it.
  72. </p>
  73. <a name="Cloning-the-source-tree"></a>
  74. <h3 class="section">2.2 Cloning the source tree<span class="pull-right"><a class="anchor hidden-xs" href="#Cloning-the-source-tree" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Cloning-the-source-tree" aria-hidden="true">TOC</a></span></h3>
  75. <div class="example">
  76. <pre class="example">git clone https://git.ffmpeg.org/ffmpeg.git &lt;target&gt;
  77. </pre></div>
  78. <p>This will put the FFmpeg sources into the directory <var>&lt;target&gt;</var>.
  79. </p>
  80. <div class="example">
  81. <pre class="example">git clone git@source.ffmpeg.org:ffmpeg &lt;target&gt;
  82. </pre></div>
  83. <p>This will put the FFmpeg sources into the directory <var>&lt;target&gt;</var> and let
  84. you push back your changes to the remote repository.
  85. </p>
  86. <div class="example">
  87. <pre class="example">git clone gil@ffmpeg.org:ffmpeg-web &lt;target&gt;
  88. </pre></div>
  89. <p>This will put the source of the FFmpeg website into the directory
  90. <var>&lt;target&gt;</var> and let you push back your changes to the remote repository.
  91. (Note that <var>gil</var> stands for GItoLite and is not a typo of <var>git</var>.)
  92. </p>
  93. <p>If you don&rsquo;t have write-access to the ffmpeg-web repository, you can
  94. create patches after making a read-only ffmpeg-web clone:
  95. </p>
  96. <div class="example">
  97. <pre class="example">git clone git://ffmpeg.org/ffmpeg-web &lt;target&gt;
  98. </pre></div>
  99. <p>Make sure that you do not have Windows line endings in your checkouts,
  100. otherwise you may experience spurious compilation failures. One way to
  101. achieve this is to run
  102. </p>
  103. <div class="example">
  104. <pre class="example">git config --global core.autocrlf false
  105. </pre></div>
  106. <span id="Updating-the-source-tree-to-the-latest-revision"></span><a name="Updating-the-source-tree-to-the-latest-revision-1"></a>
  107. <h3 class="section">2.3 Updating the source tree to the latest revision<span class="pull-right"><a class="anchor hidden-xs" href="#Updating-the-source-tree-to-the-latest-revision-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Updating-the-source-tree-to-the-latest-revision-1" aria-hidden="true">TOC</a></span></h3>
  108. <div class="example">
  109. <pre class="example">git pull (--rebase)
  110. </pre></div>
  111. <p>pulls in the latest changes from the tracked branch. The tracked branch
  112. can be remote. By default the master branch tracks the branch master in
  113. the remote origin.
  114. </p>
  115. <div class="float">
  116. <p><code>--rebase</code> (see below) is recommended.
  117. </p><div class="float-caption"><p><strong>IMPORTANT
  118. </strong></p></div></div>
  119. <a name="Rebasing-your-local-branches"></a>
  120. <h3 class="section">2.4 Rebasing your local branches<span class="pull-right"><a class="anchor hidden-xs" href="#Rebasing-your-local-branches" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Rebasing-your-local-branches" aria-hidden="true">TOC</a></span></h3>
  121. <div class="example">
  122. <pre class="example">git pull --rebase
  123. </pre></div>
  124. <p>fetches the changes from the main repository and replays your local commits
  125. over it. This is required to keep all your local changes at the top of
  126. FFmpeg&rsquo;s master tree. The master tree will reject pushes with merge commits.
  127. </p>
  128. <a name="Adding_002fremoving-files_002fdirectories"></a>
  129. <h3 class="section">2.5 Adding/removing files/directories<span class="pull-right"><a class="anchor hidden-xs" href="#Adding_002fremoving-files_002fdirectories" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Adding_002fremoving-files_002fdirectories" aria-hidden="true">TOC</a></span></h3>
  130. <div class="example">
  131. <pre class="example">git add [-A] &lt;filename/dirname&gt;
  132. git rm [-r] &lt;filename/dirname&gt;
  133. </pre></div>
  134. <p>Git needs to get notified of all changes you make to your working
  135. directory that makes files appear or disappear.
  136. Line moves across files are automatically tracked.
  137. </p>
  138. <a name="Showing-modifications"></a>
  139. <h3 class="section">2.6 Showing modifications<span class="pull-right"><a class="anchor hidden-xs" href="#Showing-modifications" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Showing-modifications" aria-hidden="true">TOC</a></span></h3>
  140. <div class="example">
  141. <pre class="example">git diff &lt;filename(s)&gt;
  142. </pre></div>
  143. <p>will show all local modifications in your working directory as unified diff.
  144. </p>
  145. <a name="Inspecting-the-changelog"></a>
  146. <h3 class="section">2.7 Inspecting the changelog<span class="pull-right"><a class="anchor hidden-xs" href="#Inspecting-the-changelog" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Inspecting-the-changelog" aria-hidden="true">TOC</a></span></h3>
  147. <div class="example">
  148. <pre class="example">git log &lt;filename(s)&gt;
  149. </pre></div>
  150. <p>You may also use the graphical tools like <code>gitview</code> or <code>gitk</code>
  151. or the web interface available at <a href="http://source.ffmpeg.org/">http://source.ffmpeg.org/</a>.
  152. </p>
  153. <a name="Checking-source-tree-status"></a>
  154. <h3 class="section">2.8 Checking source tree status<span class="pull-right"><a class="anchor hidden-xs" href="#Checking-source-tree-status" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Checking-source-tree-status" aria-hidden="true">TOC</a></span></h3>
  155. <div class="example">
  156. <pre class="example">git status
  157. </pre></div>
  158. <p>detects all the changes you made and lists what actions will be taken in case
  159. of a commit (additions, modifications, deletions, etc.).
  160. </p>
  161. <a name="Committing"></a>
  162. <h3 class="section">2.9 Committing<span class="pull-right"><a class="anchor hidden-xs" href="#Committing" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Committing" aria-hidden="true">TOC</a></span></h3>
  163. <div class="example">
  164. <pre class="example">git diff --check
  165. </pre></div>
  166. <p>to double check your changes before committing them to avoid trouble later
  167. on. All experienced developers do this on each and every commit, no matter
  168. how small.
  169. </p>
  170. <p>Every one of them has been saved from looking like a fool by this many times.
  171. It&rsquo;s very easy for stray debug output or cosmetic modifications to slip in,
  172. please avoid problems through this extra level of scrutiny.
  173. </p>
  174. <p>For cosmetics-only commits you should get (almost) empty output from
  175. </p>
  176. <div class="example">
  177. <pre class="example">git diff -w -b &lt;filename(s)&gt;
  178. </pre></div>
  179. <p>Also check the output of
  180. </p>
  181. <div class="example">
  182. <pre class="example">git status
  183. </pre></div>
  184. <p>to make sure you don&rsquo;t have untracked files or deletions.
  185. </p>
  186. <div class="example">
  187. <pre class="example">git add [-i|-p|-A] &lt;filenames/dirnames&gt;
  188. </pre></div>
  189. <p>Make sure you have told Git your name, email address and GPG key
  190. </p>
  191. <div class="example">
  192. <pre class="example">git config --global user.name &quot;My Name&quot;
  193. git config --global user.email my@email.invalid
  194. git config --global user.signingkey ABCDEF0123245
  195. </pre></div>
  196. <p>Enable signing all commits or use -S
  197. </p>
  198. <div class="example">
  199. <pre class="example">git config --global commit.gpgsign true
  200. </pre></div>
  201. <p>Use <samp>--global</samp> to set the global configuration for all your Git checkouts.
  202. </p>
  203. <p>Git will select the changes to the files for commit. Optionally you can use
  204. the interactive or the patch mode to select hunk by hunk what should be
  205. added to the commit.
  206. </p>
  207. <div class="example">
  208. <pre class="example">git commit
  209. </pre></div>
  210. <p>Git will commit the selected changes to your current local branch.
  211. </p>
  212. <p>You will be prompted for a log message in an editor, which is either
  213. set in your personal configuration file through
  214. </p>
  215. <div class="example">
  216. <pre class="example">git config --global core.editor
  217. </pre></div>
  218. <p>or set by one of the following environment variables:
  219. <var>GIT_EDITOR</var>, <var>VISUAL</var> or <var>EDITOR</var>.
  220. </p>
  221. <p>Log messages should be concise but descriptive. Explain why you made a change,
  222. what you did will be obvious from the changes themselves most of the time.
  223. Saying just &quot;bug fix&quot; or &quot;10l&quot; is bad. Remember that people of varying skill
  224. levels look at and educate themselves while reading through your code. Don&rsquo;t
  225. include filenames in log messages, Git provides that information.
  226. </p>
  227. <p>Possibly make the commit message have a terse, descriptive first line, an
  228. empty line and then a full description. The first line will be used to name
  229. the patch by <code>git format-patch</code>.
  230. </p>
  231. <a name="Preparing-a-patchset"></a>
  232. <h3 class="section">2.10 Preparing a patchset<span class="pull-right"><a class="anchor hidden-xs" href="#Preparing-a-patchset" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Preparing-a-patchset" aria-hidden="true">TOC</a></span></h3>
  233. <div class="example">
  234. <pre class="example">git format-patch &lt;commit&gt; [-o directory]
  235. </pre></div>
  236. <p>will generate a set of patches for each commit between <var>&lt;commit&gt;</var> and
  237. current <var>HEAD</var>. E.g.
  238. </p>
  239. <div class="example">
  240. <pre class="example">git format-patch origin/master
  241. </pre></div>
  242. <p>will generate patches for all commits on current branch which are not
  243. present in upstream.
  244. A useful shortcut is also
  245. </p>
  246. <div class="example">
  247. <pre class="example">git format-patch -n
  248. </pre></div>
  249. <p>which will generate patches from last <var>n</var> commits.
  250. By default the patches are created in the current directory.
  251. </p>
  252. <a name="Sending-patches-for-review"></a>
  253. <h3 class="section">2.11 Sending patches for review<span class="pull-right"><a class="anchor hidden-xs" href="#Sending-patches-for-review" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Sending-patches-for-review" aria-hidden="true">TOC</a></span></h3>
  254. <div class="example">
  255. <pre class="example">git send-email &lt;commit list|directory&gt;
  256. </pre></div>
  257. <p>will send the patches created by <code>git format-patch</code> or directly
  258. generates them. All the email fields can be configured in the global/local
  259. configuration or overridden by command line.
  260. Note that this tool must often be installed separately (e.g. <var>git-email</var>
  261. package on Debian-based distros).
  262. </p>
  263. <a name="Renaming_002fmoving_002fcopying-files-or-contents-of-files"></a>
  264. <h3 class="section">2.12 Renaming/moving/copying files or contents of files<span class="pull-right"><a class="anchor hidden-xs" href="#Renaming_002fmoving_002fcopying-files-or-contents-of-files" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Renaming_002fmoving_002fcopying-files-or-contents-of-files" aria-hidden="true">TOC</a></span></h3>
  265. <p>Git automatically tracks such changes, making those normal commits.
  266. </p>
  267. <div class="example">
  268. <pre class="example">mv/cp path/file otherpath/otherfile
  269. git add [-A] .
  270. git commit
  271. </pre></div>
  272. <a name="Git-configuration"></a>
  273. <h2 class="chapter">3 Git configuration<span class="pull-right"><a class="anchor hidden-xs" href="#Git-configuration" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Git-configuration" aria-hidden="true">TOC</a></span></h2>
  274. <p>In order to simplify a few workflows, it is advisable to configure both
  275. your personal Git installation and your local FFmpeg repository.
  276. </p>
  277. <a name="Personal-Git-installation"></a>
  278. <h3 class="section">3.1 Personal Git installation<span class="pull-right"><a class="anchor hidden-xs" href="#Personal-Git-installation" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Personal-Git-installation" aria-hidden="true">TOC</a></span></h3>
  279. <p>Add the following to your <samp>~/.gitconfig</samp> to help <code>git send-email</code>
  280. and <code>git format-patch</code> detect renames:
  281. </p>
  282. <div class="example">
  283. <pre class="example">[diff]
  284. renames = copy
  285. </pre></div>
  286. <a name="Repository-configuration"></a>
  287. <h3 class="section">3.2 Repository configuration<span class="pull-right"><a class="anchor hidden-xs" href="#Repository-configuration" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Repository-configuration" aria-hidden="true">TOC</a></span></h3>
  288. <p>In order to have <code>git send-email</code> automatically send patches
  289. to the ffmpeg-devel mailing list, add the following stanza
  290. to <samp>/path/to/ffmpeg/repository/.git/config</samp>:
  291. </p>
  292. <div class="example">
  293. <pre class="example">[sendemail]
  294. to = ffmpeg-devel@ffmpeg.org
  295. </pre></div>
  296. <a name="FFmpeg-specific"></a>
  297. <h2 class="chapter">4 FFmpeg specific<span class="pull-right"><a class="anchor hidden-xs" href="#FFmpeg-specific" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-FFmpeg-specific" aria-hidden="true">TOC</a></span></h2>
  298. <a name="Reverting-broken-commits"></a>
  299. <h3 class="section">4.1 Reverting broken commits<span class="pull-right"><a class="anchor hidden-xs" href="#Reverting-broken-commits" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Reverting-broken-commits" aria-hidden="true">TOC</a></span></h3>
  300. <div class="example">
  301. <pre class="example">git reset &lt;commit&gt;
  302. </pre></div>
  303. <p><code>git reset</code> will uncommit the changes till <var>&lt;commit&gt;</var> rewriting
  304. the current branch history.
  305. </p>
  306. <div class="example">
  307. <pre class="example">git commit --amend
  308. </pre></div>
  309. <p>allows one to amend the last commit details quickly.
  310. </p>
  311. <div class="example">
  312. <pre class="example">git rebase -i origin/master
  313. </pre></div>
  314. <p>will replay local commits over the main repository allowing to edit, merge
  315. or remove some of them in the process.
  316. </p>
  317. <div class="float">
  318. <p><code>git reset</code>, <code>git commit --amend</code> and <code>git rebase</code>
  319. rewrite history, so you should use them ONLY on your local or topic branches.
  320. The main repository will reject those changes.
  321. </p><div class="float-caption"><p><strong>NOTE
  322. </strong></p></div></div>
  323. <div class="example">
  324. <pre class="example">git revert &lt;commit&gt;
  325. </pre></div>
  326. <p><code>git revert</code> will generate a revert commit. This will not make the
  327. faulty commit disappear from the history.
  328. </p>
  329. <a name="Pushing-changes-to-remote-trees"></a>
  330. <h3 class="section">4.2 Pushing changes to remote trees<span class="pull-right"><a class="anchor hidden-xs" href="#Pushing-changes-to-remote-trees" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Pushing-changes-to-remote-trees" aria-hidden="true">TOC</a></span></h3>
  331. <div class="example">
  332. <pre class="example">git push origin master --dry-run
  333. </pre></div>
  334. <p>Will simulate a push of the local master branch to the default remote
  335. (<var>origin</var>). And list which branches and ranges or commits would have been
  336. pushed.
  337. Git will prevent you from pushing changes if the local and remote trees are
  338. out of sync. Refer to <a href="#Updating-the-source-tree-to-the-latest-revision">Updating the source tree to the latest revision</a>.
  339. </p>
  340. <div class="example">
  341. <pre class="example">git remote add &lt;name&gt; &lt;url&gt;
  342. </pre></div>
  343. <p>Will add additional remote with a name reference, it is useful if you want
  344. to push your local branch for review on a remote host.
  345. </p>
  346. <div class="example">
  347. <pre class="example">git push &lt;remote&gt; &lt;refspec&gt;
  348. </pre></div>
  349. <p>Will push the changes to the <var>&lt;remote&gt;</var> repository.
  350. Omitting <var>&lt;refspec&gt;</var> makes <code>git push</code> update all the remote
  351. branches matching the local ones.
  352. </p>
  353. <a name="Finding-a-specific-svn-revision"></a>
  354. <h3 class="section">4.3 Finding a specific svn revision<span class="pull-right"><a class="anchor hidden-xs" href="#Finding-a-specific-svn-revision" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Finding-a-specific-svn-revision" aria-hidden="true">TOC</a></span></h3>
  355. <p>Since version 1.7.1 Git supports &lsquo;<samp>:/foo</samp>&rsquo; syntax for specifying commits
  356. based on a regular expression. see man gitrevisions
  357. </p>
  358. <div class="example">
  359. <pre class="example">git show :/'as revision 23456'
  360. </pre></div>
  361. <p>will show the svn changeset &lsquo;<samp>r23456</samp>&rsquo;. With older Git versions searching in
  362. the <code>git log</code> output is the easiest option (especially if a pager with
  363. search capabilities is used).
  364. </p>
  365. <p>This commit can be checked out with
  366. </p>
  367. <div class="example">
  368. <pre class="example">git checkout -b svn_23456 :/'as revision 23456'
  369. </pre></div>
  370. <p>or for Git &lt; 1.7.1 with
  371. </p>
  372. <div class="example">
  373. <pre class="example">git checkout -b svn_23456 $SHA1
  374. </pre></div>
  375. <p>where <var>$SHA1</var> is the commit hash from the <code>git log</code> output.
  376. </p>
  377. <a name="gpg-key-generation"></a>
  378. <h2 class="chapter">5 gpg key generation<span class="pull-right"><a class="anchor hidden-xs" href="#gpg-key-generation" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gpg-key-generation" aria-hidden="true">TOC</a></span></h2>
  379. <p>If you have no gpg key yet, we recommend that you create a ed25519 based key as it
  380. is small, fast and secure. Especially it results in small signatures in git.
  381. </p>
  382. <div class="example">
  383. <pre class="example">gpg --default-new-key-algo &quot;ed25519/cert,sign+cv25519/encr&quot; --quick-generate-key &quot;human@server.com&quot;
  384. </pre></div>
  385. <p>When generating a key, make sure the email specified matches the email used in git as some sites like
  386. github consider mismatches a reason to declare such commits unverified. After generating a key you
  387. can add it to the MAINTAINER file and upload it to a keyserver.
  388. </p>
  389. <a name="Pre_002dpush-checklist"></a>
  390. <h2 class="chapter">6 Pre-push checklist<span class="pull-right"><a class="anchor hidden-xs" href="#Pre_002dpush-checklist" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Pre_002dpush-checklist" aria-hidden="true">TOC</a></span></h2>
  391. <p>Once you have a set of commits that you feel are ready for pushing,
  392. work through the following checklist to doublecheck everything is in
  393. proper order. This list tries to be exhaustive. In case you are just
  394. pushing a typo in a comment, some of the steps may be unnecessary.
  395. Apply your common sense, but if in doubt, err on the side of caution.
  396. </p>
  397. <p>First, make sure that the commits and branches you are going to push
  398. match what you want pushed and that nothing is missing, extraneous or
  399. wrong. You can see what will be pushed by running the git push command
  400. with <samp>--dry-run</samp> first. And then inspecting the commits listed with
  401. <code>git log -p 1234567..987654</code>. The <code>git status</code> command
  402. may help in finding local changes that have been forgotten to be added.
  403. </p>
  404. <p>Next let the code pass through a full run of our test suite.
  405. </p>
  406. <ul>
  407. <li> <code>make distclean</code>
  408. </li><li> <code>/path/to/ffmpeg/configure</code>
  409. </li><li> <code>make fate</code>
  410. </li><li> if fate fails due to missing samples run <code>make fate-rsync</code> and retry
  411. </li></ul>
  412. <p>Make sure all your changes have been checked before pushing them, the
  413. test suite only checks against regressions and that only to some extend. It does
  414. obviously not check newly added features/code to be working unless you have
  415. added a test for that (which is recommended).
  416. </p>
  417. <p>Also note that every single commit should pass the test suite, not just
  418. the result of a series of patches.
  419. </p>
  420. <p>Once everything passed, push the changes to your public ffmpeg clone and post a
  421. merge request to ffmpeg-devel. You can also push them directly but this is not
  422. recommended.
  423. </p>
  424. <a name="Server-Issues"></a>
  425. <h2 class="chapter">7 Server Issues<span class="pull-right"><a class="anchor hidden-xs" href="#Server-Issues" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Server-Issues" aria-hidden="true">TOC</a></span></h2>
  426. <p>Contact the project admins at <a href="mailto:root@ffmpeg.org">root@ffmpeg.org</a> if you have technical
  427. problems with the Git server.
  428. </p>
  429. </body>
  430. </html>