====== How to package a git upstream snapshot with git-buildpackage ====== === Prerequisites === Let us assume we want package the last upstream git snapshot of **gedit-latex** using git-buildpackage. The upstream repo is at git://git.gnome.org/gedit-latex and you want to package current state of branch "**master**". The packaging repo is at git://anonscm.debian.org/collab-maint/gedit-latex.git and the packaging work is done in branch "**master**". If there is no packaging repo, just [[http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.html#GBP.IMPORT.EXISTING|create one]]! === Steps === * Clone packaging repo (if not already present locally): git clone git://anonscm.debian.org/collab-maint/gedit-latex.git cd gedit-latex * Fetch required upstream branch (calling it something different than "//master//"!): git remote add uprepo git://git.gnome.org/gedit-latex git fetch uprepo git branch upsnap --track uprepo/master * Apply any change you may need to the Debian packaging you may need: git branch debsnap git checkout debsnap ... * You may now want to edit the (or add a new ) the last debian/changelog entry: git-dch --debian-branch=debsnap --snapshot (or "**--release**" if your intention is to publish this package)... and then edit it, mentioning the upstream snapshot you are packacing: git show upsnap | head -n 1 gedit debian/changelog ... git commit debian/changelog -m "Packaging `git show upsnap | head -n 1`" * Finally, build it: git-buildpackage --git-upstream-branch=upsnap --git-debian-branch=debsnap