This file is indexed.

/usr/share/doc/git-dpm/manpage.html is in git-dpm 0.8.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
<!-- Creator     : groff version 1.21 -->
<!-- CreationDate: Mon Dec 12 14:34:08 2011 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title>GIT-DPM</title>

</head>
<body>

<h1 align="center">GIT-DPM</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#SHORT EXPLANATION OF THE BRANCHES">SHORT EXPLANATION OF THE BRANCHES</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#GLOBAL OPTIONS">GLOBAL OPTIONS</a><br>
<a href="#COMMANDS">COMMANDS</a><br>
<a href="#the debian/.git&minus;dpm file">the debian/.git&minus;dpm file</a><br>
<a href="#SHORTCUTS">SHORTCUTS</a><br>
<a href="#BRANCHES">BRANCHES</a><br>
<a href="#COPYRIGHT">COPYRIGHT</a><br>
<a href="#REPORTING BUGS AND ISSUES">REPORTING BUGS AND ISSUES</a><br>

<hr>


<h2>NAME
<a name="NAME"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">git&minus;dpm
&minus; debian packages in git manager</p>

<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>git&minus;dpm
&minus;&minus;help</b></p>


<p style="margin-left:11%; margin-top: 1em"><b>git&minus;dpm</b>
[ <i>options</i> ] <i>command</i> [
<i>per&minus;command&minus;options and &minus;arguments</i>
]</p>

<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">Git&minus;dpm
is a tool to handle a debian source package in a git
repository.</p>

<p style="margin-left:11%; margin-top: 1em">Each project
contains three branches, a debian branch
(<b>master</b>/<i>whatever</i>), a patched branch
(<b>patched</b>/<b>patched&minus;</b><i>whatever</i>) and an
upstream branch
(<b>upstream</b>/<b>upstream&minus;</b><i>whatever</i>) and
<b>git&minus;dpm</b> helps you store the information in
there so you have your changes exportable as quilt
series.</p>

<p style="margin-left:11%; margin-top: 1em">Git&minus;dpm
will guess the other two branches based on the branch it
sees. (Most commands act based on the current HEAD, i.e.
what branch you have currently checked out, though some as
e.g. <b>status</b> allows an optional argument instead). So
for example, if you are in branch <b>master</b>,
git&minus;dpm assumes the corresponding upstream branch is
called <b>upstream</b>. If you are in branch
<b>upstream&minus;something</b>, it assumes the debian
branch is called <b>something</b>.</p>

<p style="margin-left:11%; margin-top: 1em">Note that most
commands may switch to another branch automatically, partly
because it is easier to implement that way and hopefully so
one does not need to switch branches manually so often.</p>

<h2>SHORT EXPLANATION OF THE BRANCHES
<a name="SHORT EXPLANATION OF THE BRANCHES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">the upstream
branch
(<b>upstream</b>|<b>upstream&minus;</b><i>whatever</i>)</p>

<p style="margin-left:22%;">This branch contains the
upstream sources. It contents need to be equal enough to the
contents in your upstream tarball.</p>

<p style="margin-left:11%;">the patched branch
(<b>patched</b>|<b>patched&minus;</b><i>whatever</i>)</p>

<p style="margin-left:22%;">This branch contains your
patches to the upstream source. Every commit will be stored
as a single patch in the resulting package.</p>

<p style="margin-left:22%; margin-top: 1em">Most of the
time it will not exist as branch known to <b>git</b>, but
only as some point in the history of the debian branch and
possibly as tag for published versions. <b>Git&minus;dpm</b>
will create it when needed and remove the branch when no
longer needed.</p>

<p style="margin-left:22%; margin-top: 1em">To help git
generate a linear patch series, this should ideal be a
linear chain of commits, whose description are helpful for
other people.</p>

<p style="margin-left:22%; margin-top: 1em">As this branch
is regulary rebased, you should not publish it.</p>

<p style="margin-left:11%;">the debian branch
(<b>master</b>|<i>whatever</i><b>)</b></p>

<p style="margin-left:22%;">This is the primary branch.</p>

<p style="margin-left:22%; margin-top: 1em">This branch
contains the <b>debian/</b> directory and has the patched
branch merged in.</p>

<p style="margin-left:22%; margin-top: 1em">Every change
not in <b>debian/</b>, <b>.git</b><i>*</i> or deleting files
must be done in the patched branch.</p>

<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">Let&rsquo;s
start with some examples: <br>
Checking out a project</p>

<p style="margin-left:22%;">First get the master branch:
<b><br>
git clone</b> <i>URL</i></p>

<p style="margin-left:22%; margin-top: 1em">Then create
upstream branch and see if the .orig.tar is ready: <b><br>
git&minus;dpm prepare</b></p>

<p style="margin-left:22%; margin-top: 1em">Create the
patched branch and check it out: <b><br>
git&minus;dpm checkout&minus;patched</b></p>

<p style="margin-left:22%; margin-top: 1em">Do some
changes, apply some patches, commit them.. <i><br>
...</i> <b><br>
git commit</b></p>

<p style="margin-left:22%; margin-top: 1em">If your
modification fixes a previous change (and that is not the
last commit, otherwise you could have used
&minus;&minus;amend), you might want to squash those two
commits into one, so use: <b><br>
git rebase &minus;i upstream</b></p>

<p style="margin-left:22%; margin-top: 1em">Then you want
to get those changes into the debian branch and the new
patch files created (which you can do using <b>git&minus;dpm
update&minus;patches</b>), but you most likely want to also
document what you did in the changelog, so all in one step:
<b><br>
git&minus;dpm dch &minus;i</b></p>

<p style="margin-left:22%; margin-top: 1em">Perhaps change
something in the debian packaging: <i><br>
...</i> <b><br>
git commit &minus;a</b></p>

<p style="margin-left:22%; margin-top: 1em">Then push the
whole thing back: <b><br>
git push</b></p>

<p style="margin-left:11%;">Switching to a new upstream
version</p>

<p style="margin-left:22%;">Get a new .orig.tar file.
Either upgrade your upstream branch to the contents of that
file and call <b>git&minus;dpm new&minus;upstream
../</b><i>new&minus;stuff</i><b>.orig.tar.gz</b> or tell
git&minus;dpm to import and record it: <b><br>
git&minus;dpm import&minus;new&minus;upstream
&minus;&minus;rebase
../</b><i>new&minus;stuff</i><b>.orig.tar.gz</b></p>

<p style="margin-left:22%; margin-top: 1em">This will
rebase the patched branch to the new upstream branch,
perhaps you will need to resolve some conflicts: <i><br>
vim ...</i> <b><br>
git add</b> <i>resolved files</i> <b><br>
git rebase &minus;&minus;continue</b></p>

<p style="margin-left:22%; margin-top: 1em">After rebase is
run (with some luck even in the first try): <b><br>
git&minus;dpm dch &minus;&minus; &minus;v</b>
<i>newupstream</i><b>&minus;1 &quot;new upstream
version&quot;</b></p>

<p style="margin-left:22%; margin-top: 1em">You could have
also done the last step in three by: <b><br>
git&minus;dpm update&minus;patches <br>
dch &minus;v</b> <i>newupstream</i><b>&minus;1 &quot;new
upstream version&quot; <br>
git commit &minus;&minus;amend &minus;a</b></p>

<p style="margin-left:22%; margin-top: 1em">Do other
debian/ changes: <i><br>
...</i> <b><br>
git commit &minus;a</b></p>

<p style="margin-left:22%; margin-top: 1em">Then push the
whole thing back: <b><br>
git push</b></p>

<p style="margin-left:11%;">Creating a new project</p>

<p style="margin-left:22%;">Create an <b>upstream</b> (or
<b>upstream&minus;</b><i>whatever</i>) branch containing the
contents of your orig.tar file: <b><br>
tar &minus;xvf</b>
<i>example</i><b>_</b><i>0</i><b>.orig.tar.gz <br>
cd</b> <i>example</i><b>&minus;</b><i>0</i> <b><br>
git init <br>
git add . <br>
git commit &minus;m &quot;import</b>
<i>example</i><b>_</b><i>0</i><b>.orig.tar.gz&quot; <br>
git checkout &minus;b upstream&minus;unstable</b></p>

<p style="margin-left:22%; margin-top: 1em">You might want
to use pristine tar to store your tar: <b><br>
pristine&minus;tar commit
../</b><i>example</i><b>_</b><i>0</i><b>.orig.tar.gz
upstream&minus;unstable</b></p>

<p style="margin-left:22%; margin-top: 1em">Then let
git&minus;dpm know what tarball your upstream branch belongs
to: <b><br>
git&minus;dpm init
../</b><i>example</i><b>_</b><i>0</i><b>.orig.tar.gz</b></p>

<p style="margin-left:22%; margin-top: 1em">Note that since
you were in <b>upstream&minus;unstable</b> in this example,
in the last example <b>git&minus;dpm</b> assumed you want
your debian branch called <b>unstable</b> and not
<b>master</b>, so after the command returned you are in the
newly created <b>unstable</b> branch.</p>

<p style="margin-left:22%; margin-top: 1em">Do the rest of
the packaging: <i><br>
vim</i> <b>debian/control debian/rules <br>
dch &minus;&minus;create &minus;&minus;package</b>
<i>example</i> <b>&minus;v</b> <i>0</i><b>&minus;1 <br>
git add debian/control debian/rules debian/changelog <br>
git commit &minus;m &quot;initial packaging&quot;</b></p>

<p style="margin-left:22%; margin-top: 1em">Then add some
patches: <b><br>
git&minus;dpm checkout&minus;patched</b> <i><br>
vim ...</i> <b><br>
git commit &minus;a <br>
git&minus;dpm dch &quot;</b><i>fix ... (Closes:
num)</i><b>&quot;</b></p>

<p style="margin-left:22%; margin-top: 1em">The
<b>git&minus;dpm checkout&minus;patched</b> created a
temporary branch <b>patched&minus;unstable</b> (as you were
in a branch called <b>unstable</b>. If you had called it
with HEAD being a branch <b>master</b>, it would have been
<b>patched</b>) to which you added commits. Then the
<b>git&minus;dpm update&minus;patches</b> implied by
<b>git&minus;dpm dch</b> merged those changes into
<b>unstable</b>, deleted the temporary branch and created
new <b>debian/patches/</b> files.</p>

<p style="margin-left:22%; margin-top: 1em">Then build your
package: <b><br>
git&minus;dpm status &amp;&amp; <br>
dpkg&minus;buildpackage &minus;rfakeroot &minus;us &minus;uc
&minus;I&quot;.git*&quot;</b></p>

<p style="margin-left:22%; margin-top: 1em">Now take a look
what happened, perhaps you want to add some files to
<b>.gitignore</b> (in the <b>unstable</b> branch), or remove
some files from the <b>unstable</b> branch becaus your clean
rule removes them.</p>

<p style="margin-left:22%; margin-top: 1em">Continue the
last few steps until the package is finished. Then push your
package: <b><br>
git&minus;dpm tag <br>
git push &minus;&minus;tags</b> <i>target</i>
<b>unstable:unstable
pristine&minus;tar:pristine&minus;tar</b></p>

<h2>GLOBAL OPTIONS
<a name="GLOBAL OPTIONS"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>&minus;&minus;debug</b></p>

<p style="margin-left:22%;">Give verbose output what
git&minus;dpm is doing. Mostly only useful for debugging or
when preparing an bug report.</p>


<p style="margin-left:11%;"><b>&minus;&minus;debug&minus;git&minus;calls</b></p>

<p style="margin-left:22%;">Output git invocations to
stderr. (For more complicated debugging cases).</p>


<p style="margin-left:11%;"><b>&minus;&minus;allow&minus;changes&minus;in&minus;debian&minus;branch</b></p>

<p style="margin-left:22%;">Ignore upstream changes in your
debian branch. This will either discard them if
merge&minus;patched is called by come command or them being
ignored elsewhere.</p>

<h2>COMMANDS
<a name="COMMANDS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em"><b>init</b>
[<i>options</i>] <i>tarfile</i> [<i>upstream-commit</i>
[<i>preapplied-commit</i> <br>
[<i>patched-commit</i>]]]</p>

<p style="margin-left:22%;">Create a new project.</p>

<p style="margin-left:22%; margin-top: 1em">The first
argument is an upstream tarball.</p>

<p style="margin-left:22%; margin-top: 1em">You also need
to have the contents of that file and the files given with
&minus;&minus;component unpackaged as some branch or commit
in your git repository (or similar enough so
<b>dpkg&minus;source</b> will not know the difference). This
will be stored in the upstream branch (called
<b>upstream</b> or <b>upstream&minus;</b><i>whatever</i>).
If the second argument is non-existing or empty, that branch
must already exist, otherwise that branch will be
initialized with what that second argument. (It&rsquo;s your
responsiblity that the contents match. git&minus;dpm does
not know what your clean rule does, so cannot check (and
does not even try to warn yet)).</p>

<p style="margin-left:22%; margin-top: 1em">You can already
have an debian branch (called <b>master</b> or
<b>whatever</b>). If it does not exist, it will exist
afterwards. Otherwise it can contain a
<b>debian/patches/series</b> file, which git&minus;dpm will
import.</p>

<p style="margin-left:22%; margin-top: 1em">The third
argument can be a descendant of your upstream branch, that
contains the changes of your debian branch before any
patches are applied (Most people prefer to have none and
lintian warns, but if you have some, commit/cherry pick them
in a new branch/detached head on top of your upstream branch
and name them here). Without
&minus;&minus;patches&minus;applied, your debian branch may
not have any upstream changes compared to this commit (or if
it is not given, the upstream branch).</p>

<p style="margin-left:22%; margin-top: 1em">If there is no
fourth argument, git&minus;dpm will apply possible patches
in your debian branch on top of the third argument or
upstream. You can also do so yourself and give that as
fourth argument.</p>

<p style="margin-left:22%; margin-top: 1em">The contents of
this commit/branch given in the fourth commit or created by
applying patches on top of the third/your upstream branch is
then merged into your debian branch and remembered as
patched branch.</p>

<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
&minus;&minus;component</b> <i>filename</i></p>

<p style="margin-left:32%;">Record a
<b>.orig&minus;</b><i>component</i><b>.tar</b> file to be
unpacked in your upstream branch.</p>


<p style="margin-left:22%;"><b>&minus;&minus;patches&minus;applied</b></p>

<p style="margin-left:32%;">Denote the debian branch
already has the patches applied.</p>

<p style="margin-left:32%; margin-top: 1em">Without this
git&minus;dpm will check there are no changes in the debian
branch outside patch management before applying the patches
but instead check there are no differences after applying
the patches.</p>


<p style="margin-left:22%;"><b>&minus;&minus;create&minus;no&minus;patches</b></p>

<p style="margin-left:32%;">Do not create/override
<b>debian/patches</b> directory. You will have to call
<b>update&minus;patches</b> yourself. Useful if you are
importing historical data and keep the original patches in
the debian branch.</p>


<p style="margin-left:22%;"><b>&minus;&minus;record&minus;patch&minus;category</b></p>

<p style="margin-left:32%;">Add a <b>Patch-Category:</b>
field to each imported patch that is in a subdirectory of
<b>debian/patches</b>. This causes
<b>update&minus;patches</b> to store it in the same
subdirectory.</p>


<p style="margin-left:22%;"><b>&minus;&minus;record&minus;patch&minus;name</b></p>

<p style="margin-left:32%;">Add a <b>Patch-Name:</b> field
to each imported patch with its name. This causes
<b>update&minus;patches</b> to store it under its original
name.</p>

<p style="margin-left:11%;"><b>prepare</b></p>

<p style="margin-left:22%;">Make sure upstream branch and
upstream orig.tar ball are there and up to date. (Best
called after a clone or a pull).</p>

<p style="margin-left:11%;"><b>status</b>
[<i>branch</i>]</p>

<p style="margin-left:22%; margin-top: 1em">Check the
status of the current project (or of the project belonging
to the argument <i>branch</i> if that is given). Returns
with non-zero exit code if something to do is detected.</p>


<p style="margin-left:11%;"><b>checkout&minus;patched</b></p>

<p style="margin-left:22%; margin-top: 1em">Checkout the
patched branch
(<b>patched</b>|<b>patched&minus;</b><i>whatever</i>) after
making sure it exists and is one recorded in the
<b>debian/.git&minus;dpm</b> file.</p>

<p style="margin-left:22%; margin-top: 1em">If the patched
branch references an old state (i.e. one that is already
ancestor of the current debian branch), it is changed to the
recorded current one.</p>

<p style="margin-left:22%; margin-top: 1em">Otherwise you
can reset it to the last recorded state with the
<b>&minus;&minus;force</b> option.</p>

<p style="margin-left:11%;"><b>update&minus;patches</b>
[<i>options</i>] [<i>branch-name</i>]</p>

<p style="margin-left:22%; margin-top: 1em">After calling
<b>merge&minus;patched&minus;into&minus;debian</b> if
necessary, update the contents of <b>debian/patches</b> to
the current state of the <b>patched</b> branch.</p>

<p style="margin-left:22%; margin-top: 1em">Also record in
debian/.git&minus;dpm which state of the patched branch the
patches directory belongs to.</p>

<p style="margin-left:22%; margin-top: 1em">If a
<i>branch-name</i> is given, that branch is processed.
Otherwise the name is derived from the currently checked out
branch as usual.</p>

<p style="margin-left:22%; margin-top: 1em">Options:</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="9%">


<p><b>&minus;&minus;redo</b></p></td>
<td width="1%"></td>
<td width="68%">


<p>Do something, even if it seems like there is nothing to
do.</p> </td></tr>
</table>


<p style="margin-left:22%;"><b>&minus;&minus;allow&minus;revert</b>,
<b>&minus;&minus;ignore&minus;deletions</b>,
<b>&minus;&minus;dot&minus;git&minus;files=</b><i>*</i></p>

<p style="margin-left:32%;">passed on to
merge&minus;patched&minus;into&minus;debian</p>

<p style="margin-left:22%;"><b>&minus;&minus;amend</b></p>

<p style="margin-left:32%;">Do not create a new commit, but
amend the last one in the debian branch. (I.e. call
merge&minus;patched&minus;into&minus;debian with
&minus;&minus;amend and amend the updates patches into the
last commit even if that was not created by
merge&minus;patched&minus;into&minus;debian).</p>

<p style="margin-left:22%;"><b>&minus;m</b>
<i>message</i></p>

<p style="margin-left:32%;">Use <i>message</i> as commit
message. (If used together with &minus;&minus;amend, do not
reuse old commit message, author or author date but replace
the old commit with a new commit with that message).</p>


<p style="margin-left:22%;"><b>&minus;&minus;keep&minus;branch</b></p>

<p style="margin-left:32%;">do not remove an existing
patched branch (usually that is removed and can be recreated
with <b>checkout&minus;patched</b> to avoid stale copies
lurking around.</p>

<p style="margin-left:11%;"><b>dch</b> [<i>options</i>]
<b>&minus;&minus;</b> <i>dch-options</i></p>

<p style="margin-left:22%;">After calling
update&minus;patches if necessary, run devscripts&rsquo; dch
with the specified options and then do a <b>git commit</b>
with a commit message containing changes to the
<b>debian/changelog</b> file.</p>

<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
&minus;&minus;amend</b></p>

<p style="margin-left:32%;">Replace the commit currently
the head of the debian branch
(<b>master</b>|<i>something</i>) instead of creating a new
one on top. The commit message will contain also include
changes done to <b>debian/changelog</b> in the previous
commit (unless reverted by the new edit).</p>


<p style="margin-left:22%;"><b>&minus;&minus;ignore&minus;patches</b></p>

<p style="margin-left:32%;">Do not call
update&minus;patches but simply ignore the current state of
the patched branch
(<b>patched</b>|<b>patched&minus;</b><i>something</i>).</p>


<p style="margin-left:22%;"><b>&minus;&minus;keep&minus;branch</b>,
<b>&minus;&minus;allow&minus;revert</b>,
<b>&minus;&minus;allow&minus;nonlinear</b>, <b><br>
&minus;&minus;ignore&minus;deletions</b>,
<b>&minus;&minus;dot&minus;git&minus;files=</b><i>*</i></p>

<p style="margin-left:32%;">Passed to update&minus;patches,
if called.</p>


<p style="margin-left:22%;"><b>&minus;&minus;latest&minus;only</b>|<b>&minus;&minus;latest</b>|<b>&minus;l</b></p>

<p style="margin-left:32%;">Only include changes between
the current working directory before calling dch and after
calling it (and not since the last commit or the last commit
not replaced).</p>

<p style="margin-left:22%;"><b>&minus;e</b> |
<b>&minus;v</b> | <b>&minus;a</b> | <b>&minus;&minus;all</b>
| <b>&minus;s</b> | <b>&minus;n</b> |
<b>&minus;&minus;no&minus;verify</b> | <b>&minus;u</b> |
<b><br>
&minus;&minus;untracked&minus;files</b> | <b>&minus;q</b> |
<b>&minus;&minus;quiet</b> |
<b>&minus;&minus;cleanup=</b><i>...</i> |
<b>&minus;&minus;author=</b><i>...</i></p>

<p style="margin-left:32%;">passed to git commit.</p>


<p style="margin-left:11%;"><b>merge&minus;patched&minus;into&minus;debian</b>
[<i>options</i>] [<i>branch-name</i>]</p>

<p style="margin-left:22%;">Usually
<b>update&minus;patches</b> runs this for you if deemed
necessary.</p>

<p style="margin-left:22%; margin-top: 1em">This command is
the core of <b>git&minus;dpm</b>, but you usually do not
call it directly. It is called by
<b>update&minus;patches</b> and things calling
<b>update&minus;patches</b> like <b>dch</b> when
necessary.</p>

<p style="margin-left:22%; margin-top: 1em">It replaces all
files (with only the exceptions described below) in the
current debian branch (<b>master</b>|<i>whatever</i>) with
those found in the patched branch
(<b>patched</b>|<b>patched&minus;</b><i>whatever</i>).</p>

<p style="margin-left:22%; margin-top: 1em">Only the
<b>debian</b> directory and files in the root directory
starting with &quot;.git&quot; are kept from the debian
branch (so <b>.gitignore</b>, <b>.gitattributes</b>, ...
will stay). And all files that were found in the last
recorded patched branch and deleted in the current debian
branch will also be deleted in the new one.</p>

<p style="margin-left:22%; margin-top: 1em">Additionally
the <b>debian/.git&minus;dpm</b> file will be updated so the
current patched branch is recorded and is marked as
belonging to the last recorded upstream branch.</p>

<p style="margin-left:22%; margin-top: 1em">If there is no
<i>branch-name</i> given on the command line the base name
of the branches to operate on is computed from the currently
checked out branch as usual. Otherwise this argument is
used.</p>

<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
&minus;&minus;allow&minus;revert</b></p>

<p style="margin-left:32%;">Usually reverting to an old
state of the patched branch is not allowed, to avoid
mistakes (like having only pulled the debian branch and
forgot to run <b>checkout&minus;patched</b>). This option
changes that so you can for example drop the last patch in
your stack.</p>


<p style="margin-left:22%;"><b>&minus;&minus;no&minus;ignore&minus;deletions</b>
(default)</p>

<p style="margin-left:32%;">Files deleted currently in the
debian branch relative to the recorded patched branch will
still be deleted in the new debian branch and not taken from
the new patched branch. This is the default unless a
different default was set with <b><br>
git config dpm.</b><i>BRANCHNAME</i><b>.dpmIgnoreDeletions
true</b>.</p>


<p style="margin-left:22%;"><b>&minus;&minus;ignore&minus;deletions</b></p>

<p style="margin-left:32%;">Disable the behaviour described
in <b>&minus;&minus;no&minus;ignore&minus;deletions</b>.</p>


<p style="margin-left:22%;"><b>&minus;&minus;dot&minus;git&minus;files=</b><i>method</i></p>

<p style="margin-left:32%;">Specify how files starting with
<b>.git</b> outside <b>debian/</b> are handled. Those are
handles specially as <b>.gitattributes</b> and
<b>.gitignore</b> might be different in the debian branch
without being part of any patch. (The whole <b>debian/</b>
directory is always taken from the debian branch, so files
there are not affected).</p>

<p style="margin-left:32%; margin-top: 1em">Possible
methods are: <b><br>
automatic</b> (default)</p>

<p style="margin-left:43%;">Any <b>.git</b><i>*</i> files
that are added, modified or removed in the current debian
branch compared to the old upstream branch are set to this
state, everything else is taken as found in the new patched
branch.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td>
<td width="10%">


<p><b>debian</b></p></td>
<td width="1%"></td>
<td width="57%">


<p>All <b>.git</b><i>*</i> files are taken from the debian
branch. Files with a name like that from the patched branch
are ignored.</p></td></tr>
</table>

<p style="margin-left:32%;"><b>upstream</b></p>

<p style="margin-left:43%;">Files starting with <b>.git</b>
are not given special handling. They are taken from the
patched branch, unless they are deleted in the debian branch
and the default
<b>&minus;&minus;no&minus;ignore&minus;deletions</b> is
active. (i.e. just like any other file outside
<b>debian/</b>).</p>


<p style="margin-left:22%;"><b>&minus;&minus;keep&minus;branch</b></p>

<p style="margin-left:32%;">do not remove an existing
patched branch (usually that is removed and can be recreated
with <b>checkout&minus;patched</b> to avoid stale copies
lurking around).</p>

<p style="margin-left:22%;"><b>&minus;&minus;amend</b></p>

<p style="margin-left:32%;">Replace the last commit on your
debian branch (as git commit &minus;&minus;amend would do).
With the exception that every parent that is an ancestor of
or equal to the new patched branch or the recorded patched
branch is omitted. (That is, you lose not only the commit on
the debian branch, but also a previous state of the patched
branch if your last commit also merged the patched
branch).</p>

<p style="margin-left:22%;"><b>&minus;m</b>
<i>message</i></p>

<p style="margin-left:32%;">Commit message to use for the
new commit created. (If used together with
&minus;&minus;amend, this disables reusing the old author
and date).</p>


<p style="margin-left:11%;"><b>import&minus;new&minus;upstream</b>
[<i>options</i>] <i>.orig.tar</i></p>

<p style="margin-left:22%;">Import the contents of the
given tarfile (as with <b>import&minus;tar</b>) and record
this branch (as with <b>new&minus;upstream</b>).</p>

<p style="margin-left:22%; margin-top: 1em">This is roughly
equivalent to: <b><br>
git&minus;dpm import&minus;tar &minus;p</b> <i>upstream
filename</i> <b><br>
git checkout &minus;b</b> <i>upstream</i> <b><br>
git&minus;dpm new&minus;upstream</b> <i>filename</i> <b><br>
&minus;&minus;detached</b></p>

<p style="margin-left:32%;">Don&rsquo;t make the new
upstream branch an ancestor of the old upstream branch
(unless you readd that with <b>&minus;p</b>).</p>

<p style="margin-left:22%;"><b>&minus;p</b>
<i>commit-id</i>|<b>&minus;&minus;parent</b>
<i>commit-id</i></p>

<p style="margin-left:32%;">Give <b>import&minus;tar</b>
additional parents of the new commit to create.</p>

<p style="margin-left:32%; margin-top: 1em">For example if
you track upstream&rsquo;s git repository in some branch,
you can name that here to make it part of the history of
your debian branch.</p>


<p style="margin-left:22%;"><b>&minus;&minus;allow&minus;no&minus;parent</b></p>

<p style="margin-left:32%;">If dpm.importWithoutParent is
set to false via git config, git&minus;dpm will not allow
import&minus;new&minus;upstream to be run without this
option or at least on &minus;p option.</p>


<p style="margin-left:22%;"><b>&minus;&minus;rebase&minus;patched</b></p>

<p style="margin-left:32%;">After recording the new
upstream branch, rebase the patched branch to the new
upstream branch.</p>


<p style="margin-left:22%;"><b>&minus;&minus;no&minus;rebase&minus;patched</b></p>

<p style="margin-left:32%;">Do not call
rebase&minus;patched after recording the new upstream
branch. (This is currently the default, but that may change
in the future).</p>

<p style="margin-left:22%;"><b>&minus;m</b>
<i>message</i></p>

<p style="margin-left:32%;">Commit message to use for the
new commit to the Debian branch recording the new file and
upstream branch.</p>

<p style="margin-left:22%;"><b>&minus;&minus;component</b>
<i>package</i><b>_</b><i>version</i><b>.orig&minus;</b><i>component</i><b>.tar</b><i>.gz</i></p>

<p style="margin-left:32%;">Unpack the specified filename
into the <i>component</i> directory and record it so that
<b>prepare</b> and <b>status</b> know to check for it.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="9%">


<p><b>&minus;&minus;init</b></p></td>
<td width="1%"></td>
<td width="68%">


<p>None of the branches yet exists, create them.</p></td></tr>
</table>

<p style="margin-left:32%; margin-top: 1em">As the branches
to operate on are derived from <b>HEAD</b> if no
<b>&minus;&minus;branch</b> option is given, you either need
<b>HEAD</b> point to an not yet existing branch (like
directly after <b>git init</b>) or you need you give a name
with <b>&minus;&minus;branch</b>. Otherwise one of the
branches already exists and you only get an error
message.</p>

<p style="margin-left:22%;"><b>&minus;&minus;branch</b>
<i>debianbranch</i></p>

<p style="margin-left:32%;">Don&rsquo;t derive the debian
branch name from current <b>HEAD</b> but use
<i>debianbranch</i> instead. (And upstream branch namd and
patched branch name derived from that as usual).</p>


<p style="margin-left:22%;"><b>&minus;&minus;pristine&minus;tar&minus;commit</b>
| <b>&minus;&minus;ptc</b></p>

<p style="margin-left:32%;">Call <b>pristine&minus;tar
commit</b> for all imported tarballs not yet found in the
pristine&minus;tar branch.</p>


<p style="margin-left:22%;"><b>&minus;&minus;no&minus;pristine&minus;tar&minus;commit</b></p>

<p style="margin-left:32%;">Do not call
<b>pristine&minus;tar commit</b> for all imported tarballs
even if configured to do so by <b><br>
git config dpm.pristineTarCommit true</b> or by <b><br>
git config branch.</b>debianbranch<b>.dpmPristineTarCommit
true</b>.</p>


<p style="margin-left:22%;"><b>&minus;&minus;ignore&minus;deletions</b>,
<b>&minus;&minus;dot&minus;git&minus;files=</b></p>

<p style="margin-left:32%;">Passed to merge&minus;patched,
if called (only done if there were no patches
previously).</p>


<p style="margin-left:22%;"><b>&minus;&minus;upstream-author</b>
<i>author</i></p>

<p style="margin-left:32%;">Used as the
<b>&minus;&minus;author</b> argument to <b>git&minus;dpm
import&minus;tar</b>.</p>


<p style="margin-left:22%;"><b>&minus;&minus;upstream-date</b>
<i>date</i></p>

<p style="margin-left:32%;">Used as the
<b>&minus;&minus;date</b> argument to <b>git&minus;dpm
import&minus;tar</b> (especially <b>auto</b> is supported to
extract a date from the tar file).</p>

<p style="margin-left:11%;"><b>import&minus;tar</b>
[<i>options</i>] <i>.tar-file</i></p>

<p style="margin-left:22%;">Create a new commit containing
the contents of the given file. The commit will not have any
parents, unless you give <b>&minus;p</b> options. <b><br>
&minus;p</b> <i>commit-id</i>|<b>&minus;&minus;parent</b>
<i>commit-id</i></p>

<p style="margin-left:32%;">Add the given commit as parent.
(Can be specified multiple times).</p>

<p style="margin-left:22%;"><b>&minus;&minus;branch</b>
<i>branchname</i></p>

<p style="margin-left:32%;">Create new branch
<i>branchname</i> if it does not already exist or replace
<i>branchname</i> with a commit created from the tarball
with the current <i>branchname</i> head as parent.</p>

<p style="margin-left:22%;"><b>&minus;m</b>
<i>message</i></p>

<p style="margin-left:32%;">Do not start an editor for the
commit message, but use the argument instead.</p>

<p style="margin-left:22%;"><b>&minus;&minus;date</b>
<i>date</i></p>

<p style="margin-left:32%;">Date of the commit to
create.</p>

<p style="margin-left:32%; margin-top: 1em">If the value is
<b>auto</b> then the newest date of any file or directory in
the tarball is used.</p>

<p style="margin-left:22%;"><b>&minus;&minus;author</b>
<i>author</i></p>

<p style="margin-left:32%;">Author of the commit to create.
It has to be in the usual git format <i><br>
author</i> <b>&lt;</b><i>email</i><b>&gt;</b>.</p>

<p style="margin-left:11%;"><b>new&minus;upstream</b>
[<i>options</i>] <i>.orig.tar</i> [<i>commit</i>]</p>

<p style="margin-left:22%; margin-top: 1em">If you changed
the upstream branch
(<b>upstream</b>|<b>upstream&minus;</b><i>whatever</i>),
git&minus;dpm needs to know which tarball this branch now
corresponds to and you have to rebase your patched branch
(<b>patched</b>|<b>patched&minus;</b><i>whatever</i>) to the
new upstream branch.</p>

<p style="margin-left:22%; margin-top: 1em">If there is a
second argument, this command first replaces your upstream
branch with the specified commit.</p>

<p style="margin-left:22%; margin-top: 1em">Then the new
upstream branch is recorded in your debian branch&rsquo;s
<b>debian/.git&minus;dpm</b> file.</p>

<p style="margin-left:22%; margin-top: 1em">If you
specified <b>&minus;&minus;rebase&minus;patched</b> (or
short <b>&minus;&minus;rebase</b>), <b>git&minus;dpm
rebase&minus;patched</b> will be called to rebase your
patched branch on top of the new upstream branch.</p>

<p style="margin-left:22%; margin-top: 1em">After this (and
if the branch then looks like what you want), you still need
to call <b>git&minus;dpm
merge&minus;patched&minus;into&minus;debian</b> (or directly
<b>git&minus;dpm update&minus;patches</b>).</p>

<p style="margin-left:22%; margin-top: 1em"><b>WARNING</b>
to avoid any misunderstandings: You have to change the
upstream branch before using this command. It&rsquo;s your
responsibility to ensure the contents of the tarball match
those of the upstream branch. <b><br>
&minus;&minus;rebase&minus;patched</b></p>

<p style="margin-left:32%;">Automatically call
<b>git&minus;dpm rebase&minus;patched</b>.</p>


<p style="margin-left:22%;"><b>&minus;&minus;new&minus;tarball&minus;only</b></p>

<p style="margin-left:32%;">Don&rsquo;t refuse operation if
the tarball changes but the upstream branch did not. (This
is only sensible if the tarball changed without changing its
contents, see the warning above).</p>

<p style="margin-left:22%;"><b>&minus;m</b>
<i>message</i></p>

<p style="margin-left:32%;">Commit message to use for the
new commit to the Debian branch recording the new file and
upstream branch.</p>

<p style="margin-left:22%;"><b>&minus;&minus;amend</b></p>

<p style="margin-left:32%;">Replace the last commit instead
of creating a new one on top.</p>

<p style="margin-left:22%;"><b>&minus;&minus;component</b>
<i>filename</i></p>

<p style="margin-left:32%;">Record <i>filename</i> as
needed component source file (i.e. a
<i>sourcename</i><b>_</b><i>upstreamversion</i><b>.orig&minus;</b><i>component</i><b>.tar.</b><i>compression</i>
file). It&rsquo;s your responsible to have that file&rsquo;s
contents already as part of your upstream branch (in a
<i>component</i> subdirectory).</p>

<p style="margin-left:32%; margin-top: 1em">(Recorded files
will be looksed for by <b>status</b> and <b>prepare</b>. The
list of recorded component source files is removed when a
new upstream branch or upstream <b>.orig</b> source file is
recorded).</p>


<p style="margin-left:22%;"><b>&minus;&minus;ignore&minus;deletions</b>,
<b>&minus;&minus;ot&minus;git&minus;files=</b></p>

<p style="margin-left:32%;">Passed to merge&minus;patched,
if called (which is only done if there were no patches
previously, so the new upstream branch is merged in
directly).</p>


<p style="margin-left:11%;"><b>rebase&minus;patched</b></p>

<p style="margin-left:22%;">Try to rebase your current
patched branch
(<b>patched</b>|<b>patched&minus;</b><i>whatever</i>) to
your current current upstream branch
(<b>upstream</b>|<b>upstream&minus;</b><i>whatever</i>).</p>

<p style="margin-left:22%; margin-top: 1em">If those
branches do not yet exist as git branches, they are
(re)created from the information recorded in
<b>debian/.git&minus;dpm</b> first.</p>

<p style="margin-left:22%; margin-top: 1em">This is only a
convenience wrapper around git rebase that first tries to
determine what exactly is to rebase. If there are any
conflicts, git rebase will ask you to resolv them and tell
rebase to continue.</p>

<p style="margin-left:22%; margin-top: 1em">After this is
finished (and if the branch then looks like what you want),
you still need
<b>merge&minus;patched&minus;into&minus;debian</b> (or
directly <b>update&minus;patches</b>).</p>

<p style="margin-left:11%;"><b>tag</b> [ <i>options</i> ] [
<i>version</i> ]</p>

<p style="margin-left:22%;">Add tags to the uptream,
patched and debian branches. If no version is given, it is
taken from debian/changelog.</p>

<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
&minus;&minus;refresh</b></p>

<p style="margin-left:32%;">Overwrite the tags if they are
already there and differ (except upstream).</p>


<p style="margin-left:22%;"><b>&minus;&minus;refresh&minus;upstream</b></p>

<p style="margin-left:32%;">Overwrite the upstream if that
is there and differs.</p>


<p style="margin-left:22%;"><b>&minus;&minus;allow&minus;stale&minus;patches</b></p>

<p style="margin-left:32%;">Don&rsquo;t error out if
patches are not up to date. This is only useful if you are
importing historical data and want to tag it.</p>

<p style="margin-left:22%;"><b>&minus;&minus;named</b></p>

<p style="margin-left:32%;">Use the package name as part of
the names of the generated tags. (use <b>git config
dpm.tagsNamed true</b> to make this the default)</p>

<p style="margin-left:22%;"><b>&minus;&minus;with-name</b>
<i>name</i></p>

<p style="margin-left:32%;">Like <b>&minus;&minus;named</b>
but give the name to use.</p>


<p style="margin-left:22%;"><b>&minus;&minus;debian-tag</b>
<i>tag-name</i> <b><br>
&minus;&minus;patched-tag</b> <i>tag-name</i> <b><br>
&minus;&minus;upstream-tag</b> <i>tag-name</i></p>

<p style="margin-left:32%;">Specify the names of the tags
to generate. <b>%p</b> is replaced with the package name,
<b>%v</b> with the version (without epoch), <b>%u</b> with
the upstream version, <b>%e</b> with the epoch, <b>%%</b>
with a single <b>%</b>.</p>

<p style="margin-left:32%; margin-top: 1em">The defaults
are &rsquo;<b>%p&minus;debian%e&minus;%v</b>&rsquo;,
&rsquo;<b>%p&minus;patched%e&minus;%v</b>&rsquo; and
&rsquo;<b>%p&minus;upstream%e&minus;%u</b>&rsquo; with
<b>&minus;&minus;named</b> and
&rsquo;<b>debian%e&minus;%v</b>&rsquo;,
&rsquo;<b>patched%e&minus;%v</b>&rsquo; and
&rsquo;<b>upstream%e&minus;%u</b>&rsquo; without.</p>

<p style="margin-left:32%; margin-top: 1em">(Use <b>git
config</b> to set the values <b>dpm.debianTag</b>,
<b>dpm.patchedTag</b> and <b>dpm.upstreamTag</b> to change
the defaults of those values).</p>

<p style="margin-left:11%;"><b>ref&minus;tag</b> [
<i>options</i> ] <i>commit</i> [ <i>version</i> ]</p>

<p style="margin-left:22%;">Like <b>tag</b>, but create
tags for <i>commit</i>, i.e. <i>commit</i> will get the
debian tag and the other tags are placed where the
<b>debian/.git&minus;dpm</b> file of that commit points
to.</p>

<p style="margin-left:22%; margin-top: 1em">So it is mostly
equivalent to: <b><br>
git checkout &minus;b temp</b> <i>commit</i> <b><br>
git&minus;dpm tag</b> [<i>options</i>] [<i>version</i>]
<b><br>
git checkout</b> <i>previous-head</i> <b><br>
git branch &minus;D temp</b></p>

<p style="margin-left:22%; margin-top: 1em">Options like
<b>tag</b>.</p>

<p style="margin-left:11%;"><b>apply&minus;patch</b> [
<i>options...</i> ] [ <i>filename</i> ]</p>

<p style="margin-left:22%;">Switch to the patched branch
(assuming it is up to date, use checkout&minus;patched first
to make sure or get an warning), and apply the patch given
as argument or from stdin. <b><br>
&minus;&minus;author</b> <i>author &lt;email&gt;</i></p>

<p style="margin-left:32%;">Override the author to be
recorded.</p>


<p style="margin-left:22%;"><b>&minus;&minus;defaultauthor</b>
<i>author &lt;email&gt;</i></p>

<p style="margin-left:32%;">If no author could be
determined from the commit, use this.</p>

<p style="margin-left:22%;"><b>&minus;&minus;date</b>
<i>date</i></p>

<p style="margin-left:32%;">Date to record this patch
originally be from if non found.</p>


<p style="margin-left:22%;"><b>&minus;&minus;dpatch</b></p>

<p style="margin-left:32%;">Parse patch as dpatch patch
(Only works for dpatch patches actually being a patch, might
silently fail for others).</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="9%">


<p><b>&minus;&minus;cdbs</b></p></td>
<td width="1%"></td>
<td width="68%">


<p>Parse patch as cdbs simple&minus;patchsys.mk patch (Only
works for dpatch patches actually being a patch, might
silently fail for others).</p></td></tr>
<tr valign="top" align="left">
<td width="22%"></td>
<td width="9%">


<p><b>&minus;&minus;edit</b></p></td>
<td width="1%"></td>
<td width="68%">


<p>Start an editor before doing the commit (In case you are
too lazy to amend).</p></td></tr>
</table>


<p style="margin-left:22%;"><b>&minus;&minus;record-name</b></p>

<p style="margin-left:32%;">Add a <b>Patch-Name:</b> field
to tell <b>update&minus;patches</b> to export it with the
same name again.</p>

<p style="margin-left:22%;"><b>&minus;&minus;name</b>
<i>name</i></p>

<p style="margin-left:32%;">Add a <b>Patch-Name:</b> field
to tell <b>update&minus;patches</b> to use <i>name</i> as
filename to store this patch into (relative to
<b>debian/patches</b>).</p>

<p style="margin-left:22%;"><b>&minus;&minus;category</b>
<i>name</i></p>

<p style="margin-left:32%;">Add a <b>Patch-Category:</b>
field to tell <b>update&minus;patches</b> to always export
this patch into a subdirectory <i>name</i> of
<b>debian/patches</b>.</p>

<p style="margin-left:11%;"><b>cherry&minus;pick</b> [
<i>options...</i> ] <i>commit</i></p>

<p style="margin-left:22%;">Recreate the patched branch and
cherry&minus;pick the given commit. Then merge that back
into the debian branch and update the debian/patches
directory (i.e. mostly equivalent to checkout&minus;patched,
git&rsquo;s cherry&minus;pick, and update&minus;patches).
<b><br>
&minus;&minus;merge&minus;only</b></p>

<p style="margin-left:32%;">Only merge the patched branch
back into the debian branch but do not update the patches
directory (You&rsquo;ll need to run update&minus;patches
later to get this done).</p>

<p style="margin-left:22%;"><b>&minus;e</b> |
<b>&minus;&minus;edit</b></p>

<p style="margin-left:32%;">Passed to git&rsquo;s
cherry&minus;pick: edit the commit message picked.</p>

<p style="margin-left:22%;"><b>&minus;s</b> |
<b>&minus;&minus;signoff</b></p>

<p style="margin-left:32%;">Passed to git&rsquo;s
cherry&minus;pick: add a Signed&minus;off&minus;by
header</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="3%">


<p><b>&minus;x</b></p></td>
<td width="7%"></td>
<td width="68%">


<p>Passed to git&rsquo;s cherry&minus;pick: add a line
describing what was picked</p></td></tr>
</table>

<p style="margin-left:22%;"><b>&minus;m</b> <i>num</i> |
<b>&minus;&minus;mainline</b> <i>num</i></p>

<p style="margin-left:32%;">Passed to git&rsquo;s
cherry&minus;pick: allow picking a merge by specifign the
parent to look at.</p>


<p style="margin-left:22%;"><b>&minus;&minus;repick</b></p>

<p style="margin-left:32%;">Don&rsquo;t abort if the
specified commit is already contained.</p>


<p style="margin-left:22%;"><b>&minus;&minus;allow&minus;nonlinear</b>,
<b>&minus;&minus;ignore&minus;deletions</b>,
<b>&minus;&minus;dot&minus;git&minus;files=</b></p>

<p style="margin-left:32%;">Passed to update&minus;patches,
if called.</p>

<p style="margin-left:32%; margin-top: 1em">passed to
merge&minus;patched&minus;into&minus;debian and
update&minus;patches.</p>


<p style="margin-left:22%;"><b>&minus;&minus;keep&minus;branch</b></p>

<p style="margin-left:32%;">do not remove the patched
branch when it is no longer needed.</p>

<p style="margin-left:22%;"><b>&minus;&minus;amend</b></p>

<p style="margin-left:32%;">passed to
merge&minus;patched&minus;into&minus;debian: amend the last
commit in the debian branch.</p>

<p style="margin-left:11%;"><b>import&minus;dsc</b></p>

<p style="margin-left:22%;">Import a debian source package
from a .dsc file. This can be used to create a new project
or to import a source package into an existing project.</p>

<p style="margin-left:22%; margin-top: 1em">While a
possible old state of a project is recorded as parent
commit, the state of the old debian branch is not taken into
account. Especially all file deletions and .gitignore files
and the like need to be reapplied/readded afterwards.
(Assumption is that new source package versions from outside
might change stuff significantly, so old information might
more likely be outdated. And reapplying it is easier then
reverting such changes.)</p>

<p style="margin-left:22%; margin-top: 1em">First step is
importing the <b>.orig.tar</b> file and possible
<b>.orig&minus;</b><i>component</i><b>.tar</b> files. You
can either specify a branch to use. Otherwise
<b>import&minus;dsc</b> will look if the previous state of
this project already has the needed file so the old upstream
branch can be reused. If there is non, the file will be
imported as a new commit, by default with a possible
previous upstream branch as parent.</p>

<p style="margin-left:22%; margin-top: 1em">Then
<b>import&minus;dsc</b> will try to import the source
package in the state as <b>dpkg&minus;source &minus;x</b>
would create it. (That is applying the .diff and making
<b>debian/rules</b> executeable for 1.0 format packages and
replacing the <b>debian</b> directory with the contents of a
.debian.tar and applying possible
<b>debian/patches/series</b> for 3.0 format packages). This
is later referred to as verbatim import.</p>

<p style="margin-left:22%; margin-top: 1em">If it is a 1.0
source format package, <b>import&minus;dsc</b> then looks
for a set of supported patch systems and tries to apply
those patches. Those are then merged with the verbatim state
into the new debian branch.</p>

<p style="margin-left:22%; margin-top: 1em">Then a
<b>debian/.git&minus;dpm</b> file is created and a possible
old state of the project added as parent.</p>

<p style="margin-left:22%; margin-top: 1em">Note that
<b>dpkg&minus;source</b> is not used to extract packages,
but they are extracted manually. Especially
<b>git&minus;apply</b> is used instead of <b>patch</b>.
While this generally works (and <b>git&minus;dpm</b> has
some magic to work around some of
<b>git&minus;apply</b>&rsquo;s shortcomings), unclean
patches might sometimes need a <b>&minus;C0</b> option and
then in same cases be applied at different positions than
where <b>patch</b> would apply them.</p>

<p style="margin-left:22%; margin-top: 1em">General
options: <b><br>
&minus;b</b> | <b>&minus;&minus;branch</b>
<i>branch-name</i></p>

<p style="margin-left:32%;">Don&rsquo;t look at the current
HEAD, but import the package into the git&minus;dpm project
<i>branchname</i> or create a new project (if that branch
does not yet exist).</p>

<p style="margin-left:22%;"><b>&minus;&minus;verbatim</b>
<i>branch-name</i></p>

<p style="margin-left:32%;">After <b>import&minus;dsc</b>
has completed successfully, <i>branch-name</i> will contain
the verbatim import of the .dsc file. If a branch of that
name already exists, the new verbatim commit will also have
the old as parent. (This also causes the verbatim commit not
being amended with other changes, which can result in more
commits).</p>


<p style="margin-left:22%;"><b>&minus;&minus;use&minus;changelog</b></p>

<p style="margin-left:32%;">Parse debian/changelog of the
imported package. Use the description as commit messages and
the author and time as default for patches and import
commits without that information. (Warning: may still
contain some rough edges).</p>

<p style="margin-left:22%; margin-top: 1em">Options about
creating the upstream branch: <b><br>
&minus;&minus;upstream&minus;to&minus;use</b>
<i>commit</i></p>

<p style="margin-left:32%;">Do not import the .orig.tar nor
try to reuse an old import, but always use the <i>commit</i>
specified.</p>

<p style="margin-left:32%; margin-top: 1em">It is your
responsibility that this branch is similar enough to the
.orig.tar file plus possible .orig-component.tar in their
respective directories. (As usual, similar enough means:
Does not miss any files that your patches touch or your
build process requires (or recreates unless <b>debian/rules
clean</b> removes them again). Every file different than in
.orig.tar or not existing there you must delete in the
resulting debian branch. No patch may touch those
files.)</p>

<p style="margin-left:32%; margin-top: 1em">Use with care.
Nothing will warn you even if you use the contents of a
totally wrong upstream version.</p>


<p style="margin-left:22%;"><b>&minus;&minus;detached&minus;upstream</b></p>

<p style="margin-left:32%;">If importing a .orig.tar as new
commit, do not make an possible commit for an old upstream
version parent.</p>


<p style="margin-left:22%;"><b>&minus;&minus;upstream&minus;parent</b>
<i>commit</i></p>

<p style="margin-left:32%;">Add <i>commit</i> as
(additional) parent if importing a new upstream version.</p>

<p style="margin-left:32%; margin-top: 1em">(This can for
example be used to make upstream&rsquo;s git history part of
your package&rsquo;s history and thus help git when
cherry-picking stuff).</p>


<p style="margin-left:22%;"><b>&minus;&minus;allow&minus;no&minus;parent</b></p>

<p style="margin-left:32%;">If dpm.importWithoutParent is
set to false via git config, git&minus;dpm will not allow
import&minus;dsc to be run without this option or at least
on &minus;&minus;upstream&minus;parent option.</p>


<p style="margin-left:22%;"><b>&minus;&minus;pristine&minus;tar&minus;commit</b>
|<b>&minus;&minus;ptc</b></p>

<p style="margin-left:32%;">Call <b>pristine&minus;tar
commit</b> for all tarballs imported after the rest of the
import&minus;dsc command was successful.</p>


<p style="margin-left:22%;"><b>&minus;&minus;no&minus;pristine&minus;tar&minus;commit</b></p>

<p style="margin-left:32%;">Do not call
<b>pristine&minus;tar commit</b> for all imported tarballs
even if configured to do so by <b><br>
git config dpm.pristineTarCommit true</b> or by <b><br>
git config branch.</b>debianbranch<b>.dpmPristineTarCommit
true</b>.</p>


<p style="margin-left:22%;"><b>&minus;&minus;upstream-author</b>
<i>author</i></p>

<p style="margin-left:32%;">Used as the
<b>&minus;&minus;author</b> argument to <b>git&minus;dpm
import&minus;tar</b>.</p>


<p style="margin-left:22%;"><b>&minus;&minus;upstream-date</b>
<i>date</i></p>

<p style="margin-left:32%;">Used as the
<b>&minus;&minus;date</b> argument to <b>git&minus;dpm
import&minus;tar</b> (especially <b>auto</b> is supported to
extract a date from the tar file).</p>

<p style="margin-left:22%; margin-top: 1em">Options about
applying patches: <b><br>
&minus;f</b> |
<b>&minus;&minus;force&minus;commit&minus;reuse</b></p>

<p style="margin-left:32%;">Only look at parent and tree
and no longer at the description when trying to reuse
commits importing patches from previous package
versions.</p>

<p style="margin-left:22%;"><b>&minus;C</b><i>num</i> |
<b>&minus;&minus;patch&minus;context</b> <i>num</i></p>

<p style="margin-left:32%;">Passed as
<b>&minus;C</b><i>num</i> to <b>git&minus;apply</b>.
Specifies the number of context lines that must match.</p>


<p style="margin-left:22%;"><b>&minus;&minus;dpatch&minus;allow&minus;empty</b></p>

<p style="margin-left:32%;">Do not error out if a dpatch
file does not change anything when treated as patch.</p>

<p style="margin-left:32%; margin-top: 1em">As dpatch files
can be arbitrary scripts, <b>git&minus;dpm</b> has some
problems detecting if they are really patches. (It can only
cope with patches). If a script that is not a patch is
treated as patch that usually results in patch not modify
anything, thus those are forbidden without this option.</p>


<p style="margin-left:22%;"><b>&minus;&minus;patch&minus;system</b>
<i>mode</i></p>

<p style="margin-left:32%;">Specify what patch system is
used for source format 1.0 packages. <b><br>
auto</b> (this is the default)</p>

<p style="margin-left:43%;">Try to determine what patch
system is used by looking at <b>debian/rules</b> (and
<b>debian/control</b>).</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td>
<td width="6%">


<p><b>none</b></p></td>
<td width="5%"></td>
<td width="57%">


<p>Those are not the patches you are looking for.</p></td></tr>
</table>

<p style="margin-left:32%;"><b>history</b></p>

<p style="margin-left:43%;">Don&rsquo;t try to find any
patches in the .diff (like <b>none</b>). If if the project
already exists and the upstream tarball is the same, create
the patched state of the new one by using the patches of the
old one and adding a patch of top bringing it to the new
state.</p>

<p style="margin-left:43%; margin-top: 1em">If you import
multiple revisions of some package, where each new revision
added at most a single change to upstream, this option
allows you to almost automatically create a proper set of
patches (ideally only missing descriptions).</p>

<p style="margin-left:43%; margin-top: 1em">If there are
same changes and reverts those will be visibile in the
patches created, so this mode is not very useful in that
case.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td>
<td width="8%">


<p><b>quilt</b></p></td>
<td width="3%"></td>
<td width="57%">


<p>Extract and apply a <b>debian/patches/series</b> quilt
like series on top of possible upstream changes found in the
.diff file.</p></td></tr>
</table>

<p style="margin-left:32%;"><b>quilt&minus;first</b></p>

<p style="margin-left:43%;">As the <b>quilt</b> mode, but
apply the patches to an unmodified upstream first and then
cherry&minus;pick the changes found in the .diff file.</p>

<p style="margin-left:43%; margin-top: 1em">As this is not
the order in which patches are applied in a normal
unpack/build cycle, this will fail if those changes are not
distinct enough (for example when patches depend on changes
done in the .diff).</p>

<p style="margin-left:43%; margin-top: 1em">But if the
.diff only contains unrelated changes which varies with each
version, this gives a much nicer history, as the commits for
the patches can more easily be reused.</p>

<p style="margin-left:32%;"><b>quilt&minus;applied</b></p>

<p style="margin-left:43%;">As the <b>quilt&minus;first</b>
mode, but assume the patches are already applied in the
.diff, so apply them on top of an unmodified upstream and
then add a commit bringing it to the state in the .diff. (Or
not if that patch would be empty).</p>

<p style="margin-left:32%;"><b>dpatch</b> |
<b>dpatch&minus;first</b> | <b>dpatch&minus;applied</b></p>

<p style="margin-left:43%;">Like the <b>quilt</b> resp.
<b>quilt&minus;first</b> resp. <b>quilt&minus;applied</b>
modes, but instead look for dpatch-style patches in
<b>debian/patches/00list</b>.</p>

<p style="margin-left:43%; margin-top: 1em">Note that only
patches are supported and not dpatch running other
commands.</p>

<p style="margin-left:32%;"><b>simple</b> |
<b>simple&minus;first</b> | <b>simple&minus;applied</b></p>

<p style="margin-left:43%;">Like the <b>quilt</b> resp.
<b>quilt&minus;first</b> resp. <b>quilt&minus;applied</b>
modes, but instead assume <b>debian/patches/</b> contains
patches suiteable for cdbs&rsquo;s
<b>simple&minus;patchsys.mk</b>.</p>


<p style="margin-left:22%;"><b>&minus;&minus;patch&minus;author</b>
&quot;<i>name</i> &lt;<i>email</i>&gt;&quot;</p>

<p style="margin-left:32%;">Set the author for all git
commits importing patches.</p>


<p style="margin-left:22%;"><b>&minus;&minus;patch&minus;default&minus;author</b>
&quot;<i>name</i> &lt;<i>email</i>&gt;&quot;</p>

<p style="margin-left:32%;">Set an author for all patches
not containing author information (or where
<b>git&minus;dpm</b> cannot determine it).</p>


<p style="margin-left:22%;"><b>&minus;&minus;edit&minus;patches</b></p>

<p style="margin-left:32%;">For every patch imported, start
an editor for the commit message.</p>


<p style="margin-left:22%;"><b>&minus;&minus;record&minus;patch&minus;category</b></p>

<p style="margin-left:32%;">Add a <b>Patch-Category:</b>
field to each imported patch that is in a subdirectory of
<b>debian/patches</b>. This causes
<b>update&minus;patches</b> to store it in the same
subdirectory.</p>


<p style="margin-left:22%;"><b>&minus;&minus;record&minus;patch&minus;name</b></p>

<p style="margin-left:32%;">Add a <b>Patch-Name:</b> field
to each imported patch with its name. This causes
<b>update&minus;patches</b> to store it under its original
name.</p>

<p style="margin-left:11%;"><b>record&minus;dsc</b>
[<i>options</i>] <i>commit .dsc-file</i></p>

<p style="margin-left:22%;">Store a pristine .dsc file in a
<b>dscs</b> branch after storing the files it contains using
pristine&minus;tar.</p>

<p style="margin-left:22%; margin-top: 1em">The first
argument is an tag or commit storing the
<b>git&minus;dpm</b> project in the state belonging to the
<b>.dsc</b> file and the second argument is the <b>.dsc</b>
file itself. The files it references are expected in the
same directory as the file itself (if they are needed).</p>

<p style="margin-left:22%; margin-top: 1em">Some checks are
done to make sure the file and its contents are named
problerly and match the commit in question, but only cursory
to avoid obvious mistakes (for example only the version is
checked, but .debian.tar is not unpacked to check the files
are really the same, for example).</p>

<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
&minus;&minus;create&minus;branch</b></p>

<p style="margin-left:32%;">Create a new <b>dscs</b>
branch.</p>


<p style="margin-left:22%;"><b>&minus;&minus;allow&minus;unsigned</b></p>

<p style="margin-left:32%;">Allow recording a unsigned
<b>.dsc</b> file. This usually defeats the point of storing
them at all.</p>

<h2>the debian/.git&minus;dpm file
<a name="the debian/.git&minus;dpm file"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">You should not
need to know about the contents if this file except for
debuging git&minus;dpm.</p>

<p style="margin-left:11%; margin-top: 1em">The file
contains 8 lines, but future version may contain more.</p>

<p style="margin-left:11%; margin-top: 1em">The first line
is hint what this file is about and ignored.</p>

<p style="margin-left:11%; margin-top: 1em">Then there are
4 git commit ids for the recorded states:</p>

<p style="margin-left:22%; margin-top: 1em">First the state
of the patched branch when the patches in
<b>debian/patches</b> were last updated.</p>

<p style="margin-left:22%; margin-top: 1em">Then the state
of the patched branch when it was last merged into the
debian branch.</p>

<p style="margin-left:22%; margin-top: 1em">Then the state
upstream branch when the patched branch was last merged.</p>

<p style="margin-left:22%; margin-top: 1em">Finally the
upstream branch.</p>

<p style="margin-left:11%; margin-top: 1em">The following 3
lines are the filename, the sha1 checksum and the size of
the origtarball belonging to the recorded upstream
branch.</p>

<h2>SHORTCUTS
<a name="SHORTCUTS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">Most commands
also have shorter aliases, to avoid typing:</p>


<p style="margin-left:11%; margin-top: 1em">update&minus;patches:
up, u&minus;p, ci <br>
prepare: prep <br>
checkout&minus;patched: co, c&minus;p <br>
rebase&minus;patched: r&minus;p <br>
new&minus;upstream&minus;branch: new&minus;upstream,
n&minus;u <br>
apply&minus;patch: a&minus;p <br>
import&minus;tar: i&minus;t <br>
import&minus;new&minus;upstream: i&minus;n&minus;u, inu <br>
cherry&minus;pick: c&minus;p</p>

<h2>BRANCHES
<a name="BRANCHES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">the upstream
branch
(<b>upstream</b>|<b>upstream&minus;</b><i>whatever</i>)</p>

<p style="margin-left:22%;">This branch contains the
upstream sources. It contents need to be equal enough to the
contents in your upstream tarball.</p>

<p style="margin-left:22%; margin-top: 1em">Equal enough
means that dpkg&minus;source should see no difference
between your patched tree and and original tarball
unpackaged, the patched applied and <b>debian/rules
clean</b> run. Usually it is easiest to just store the
verbatim contents of your orig tarball here. Then you can
also use it for pristine tar.</p>

<p style="margin-left:22%; margin-top: 1em">This branch may
contain a debian/ subdirectory, which will usually be just
ignored.</p>

<p style="margin-left:22%; margin-top: 1em">You can either
publish that branch or make it only implicitly visible via
the <b>debian/.git&minus;dpm</b> file in the debian
branch.</p>

<p style="margin-left:22%; margin-top: 1em">While it
usually makes sense that newer upstream branches contain
older ones, this is not needed. You should be able to switch
from one created yourself or by some foreign-vcs importing
tool generated one to an native upstream branch or vice
versa without problems. Note that since the debian branch
has the patched branch as ancestor and the patched branch
the upstream branch, your upstream branches are part of the
history of your debian branch. Which has the advantage that
you can recreate the exact state of your branches from your
history directly (like <b>git checkout &minus;b oldstate</b>
<i>myoldtagorshaofdebianbranchcommit</i> <b>; git&minus;dpm
prepare ; git checkout unstable&minus;oldstate</b>) but the
disadvantage that to remove those histories from your
repository you have to do some manual work.</p>

<p style="margin-left:11%;">the patched branch
(<b>patched</b>|<b>patched&minus;</b><i>whatever</i>)</p>

<p style="margin-left:22%;">This branch contains your
patches to the upstream source. (which of course means it is
based on your upstream branch).</p>

<p style="margin-left:22%; margin-top: 1em">Every commit
will be stored as a single patch in the resulting
package.</p>

<p style="margin-left:22%; margin-top: 1em">To help git
generate a linear patch series, this should ideal be a
linear chain of commits, whose description are helpful for
other people.</p>

<p style="margin-left:22%; margin-top: 1em">As this branch
is regulary rebased, you should not publish it. Instead you
can recreate this branch using <b>git&minus;dpm
checkout&minus;patched</b> using the information stored in
<b>debian/.git&minus;dpm</b>.</p>

<p style="margin-left:22%; margin-top: 1em">You are not
allowed to change the contents of the <b>debian/</b>
subdirectory in this branch. Renaming files or deleting
files usuall causes unecesary large patches.</p>

<p style="margin-left:11%;">the debian branch
(<b>master</b>|<i>whatever</i>)</p>

<p style="margin-left:22%;">This is the primary branch.</p>

<p style="margin-left:22%; margin-top: 1em">This branch
contains the <b>debian/</b> directory and has the patched
branch merged in.</p>

<p style="margin-left:22%; margin-top: 1em">Every change
not in <b>debian/</b>, <b>.git</b><i>*</i> or deleting files
must be done in the patched branch.</p>

<p style="margin-left:11%;">alternative branch names</p>

<p style="margin-left:22%;">You can specify alternate
branch names for upstream and patched branches of a specific
debian branch, or force a branch to be a debian branch that
would normaly be considered e.g. upstream branch of another
branch by adding <b>dpmUpstreamBranch</b> and
<b>dpmPatchedBranch</b> configure items for the debian
branch in question (you need both, only one is treated as
error).</p>

<p style="margin-left:22%; margin-top: 1em">The following
example is a no-op for all practical purposes: <b><br>
git config branch.master.dpmUpstreamBranch upstream <br>
git config branch.master.dpmPatchedBranch patched</b></p>

<h2>COPYRIGHT
<a name="COPYRIGHT"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">Copyright
&copy; 2009,2010 Bernhard R. Link <br>
This is free software; see the source for copying
conditions. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>

<h2>REPORTING BUGS AND ISSUES
<a name="REPORTING BUGS AND ISSUES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">You can report
bugs or feature suggestions to
git&minus;dpm&minus;devel@lists.alioth.debian.org or tome.
Please send questions to
git&minus;dpm&minus;user@lists.alioth.debian.org or to me at
brlink@debian.org.</p>
<hr>
</body>
</html>