In this guide we consider adblock-plus package as example.

- Clone the git repository:

 git clone git+ssh:// 

- Go inside new adblock-plus directory created

 cd adblock-plus 

- Fetch the pristine-tar and upstream branches

 git fetch origin pristine-tar:pristine-tar upstream:upstream 

- uscan to get the new upstream release

 uscan --debug --repack 

Please USE the repack option (check for it in d/watch and if does not exist, add it)

- upgrade

 git-import-orig --pristine-tar ../<new_pack>.orig.tar.{gz,bz2} 

- push

 git push --all 

- tag

 git push --tags 

From now we can start with all required modification. Tips:

Add these rows to~/.gbp.conf:

 # run hook after the import:
 postimport = git-dch -N%(version)s -S -a --debian-branch=$GBP_BRANCH

(it automatically creates a new changelog entry with snapshot)

If using the 3.0 (quilt) source format may also be handy to add the .pc directory to the .gitignore file. To do this globally, you may use the following:

 git config --global --add core.excludesfile ~/.gitignore
 echo '/.pc/' >> ~/.gitignore
(If you have a Git repository in your home, you may want to change ~/.gitignore above).

If you use 'debcommit' instead of 'git commit' here's a useful alias:

 alias debcommit='{ quilt pop -a || [ $? = 2 ]; } && debcommit' 

(it removes all patches before commit)