|
0 |
gbp clone
|
|
1 |
---------
|
| 0 | 2 |
|
| 1 | |
git-tuneclone.sh
|
| 2 | |
----------------
|
|
3 |
Starting with gbp>0.8.1, here's a simple way to automatically fine-tune the
|
|
4 |
repository in the following ways:
|
|
5 |
- make git ignore any .pc/ directory (created by quilt)
|
|
6 |
- enable the "--follow-tags" when running 'git-push', so it's harder
|
|
7 |
to forget to push packaging tags along with the branches.
|
| 3 | 8 |
|
| 4 | |
This package comes with a script 'debian/git-tuneclone.sh'.
|
| 5 | |
Running it after a fresh clone of the packaging repository
|
| 6 | |
will fine-tune your local copy, namely:
|
| 7 | |
- make git ignore any .pc/ directory (created by quilt)
|
| 8 | |
- enable the "-follow-tags" when running 'git-push', so it's harder
|
| 9 | |
to forget to push packaging tags along with the branches.
|
| 10 | |
- do an initial checkout of the 3 packaging branches (master, pristine-tar,
|
| 11 | |
upstream)
|
| 12 | |
The script only needs to run once (though running it multiple times shouldn't
|
| 13 | |
matter).
|
| 14 | |
You are of course free to *not* run the script, if you prefer.
|
|
9 |
To enable this for ALL repositories cloned via 'gbp' (in the future), do
|
|
10 |
something like the following:
|
| 15 | 11 |
|
| 16 | |
-- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Tue, 11 Nov 2015 11:11:03 +0100
|
|
12 |
$ mkdir -p ~/bin
|
|
13 |
$ cat >> ~/bin/gbphook-postclone <<EOF
|
|
14 |
#!/bin/sh
|
|
15 |
## script to initialize a cloned repository
|
|
16 |
# - enable the "--follow-tags" mode for pushing
|
|
17 |
echo "tuning git-repository for ${NAME}"
|
|
18 |
git config push.followTags true && echo "enabled push.followTags"
|
|
19 |
# - ignore quilt's .pc/ directory
|
|
20 |
GITEXCLUDE=".git/info/exclude"
|
|
21 |
egrep "^/?\.pc/?$" "${GITEXCLUDE}" >/dev/null 2>&1 \
|
|
22 |
|| (echo "/.pc/" >> "${GITEXCLUDE}" && echo "ignoring /.pc/")
|
|
23 |
EOF
|
| 17 | 24 |
|
|
25 |
$ chmod u+x ~/bin/gbphook-postclone
|
|
26 |
$ cat >> ~/.gbp.conf <<EOF
|
|
27 |
[clone]
|
|
28 |
postclone = ~/bin/gbphook-postclone
|
|
29 |
EOF
|
|
30 |
|
|
31 |
$ gbp clone ...
|
|
32 |
|
|
33 |
-- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Mon, 1 Aug 2016 12:15:50 +0200
|