Hi!

There is my work flow with git on Science overlay.

Create a local copy of science overlay if you have ssh access:
>$ git clone git+ssh://[email protected]/proj/sci.git

Or if you don't have one:
>$ git clone git://git.overlays.gentoo.org/proj/sci.git

Or update existing one:
>$ git pull origin

Create a new branch for work to be committed:
>$ git branch $NAME
>$ git checkout $NAME
... edit ...
>$ git add $FILES
>$ export ECHANGELOG_USER="Your Name <[email protected]>"
>$ echangelog
>$ ebuild *.ebuild digest
>$ repoman -p full
>$ git add $FILES
>$ git status
>$ git commit

Try to push changes to overlay and check whether there have been changes
to overlay during your work:
>$ git push --dry-run -v origin HEAD:master

If so update master and rebase your branch:
>$ git checkout master
>$ git pull origin
>$ git checkout $NAME
>$ git rebase master

Push your changes, update master and delete your temporary branch:
>$ git push --dry-run -v origin HEAD:master
>$ git push -v origin HEAD:master
>$ git checkout master
>$ git pull origin
>$ git branch -d $NAME

Or format a patch and send via mail to developer (using send-mail or as
an attachment):
>$ git format-patch -1
>$ git send-email --to [email protected] --suppress-from 0001-yo.patch

Git formatted patches can be applied and pushed to overlay:
>$ git am 0001-your-package.patch
>$ git push --dry-run -v origin HEAD:master
>$ git push -v origin HEAD:master
>$ git checkout master
>$ git pull origin
>$ git branch -d NAME

Command "gitk" can be used to view your git tree graphically. Other
commands which might interest more are: git remote, git rebase.

Git "push origin" can be used only when your local copy has been created
using git+ssh, otherwise full address has to be used or another named
remote has to be created.

Hope it might be useful to somebody.


Cheers,
Reinis


Reply via email to