"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/source/gitwash/development_workflow.rst" between
scikit-image-0.18.1.tar.gz and scikit-image-0.18.3.tar.gz

About: scikit-image is a collection of algorithms for image processing in Python.

development_workflow.rst  (scikit-image-0.18.1):development_workflow.rst  (scikit-image-0.18.3)
skipping to change at line 14 skipping to change at line 14
Development workflow Development workflow
#################### ####################
You already have your own forked copy of the `scikit-image`_ repository, by You already have your own forked copy of the `scikit-image`_ repository, by
following :ref:`forking`. You have :ref:`set-up-fork`. You have configured following :ref:`forking`. You have :ref:`set-up-fork`. You have configured
git by following :ref:`configure-git`. Now you are ready for some real work. git by following :ref:`configure-git`. Now you are ready for some real work.
Workflow summary Workflow summary
================ ================
In what follows we'll refer to the upstream scikit-image ``master`` branch, as In what follows we'll refer to the upstream scikit-image ``main`` branch, as
"trunk". "trunk".
* Don't use your ``master`` branch for anything. Consider deleting it. * Don't use your ``main`` branch for anything. Consider deleting it.
* When you are starting a new set of changes, fetch any changes from trunk, * When you are starting a new set of changes, fetch any changes from trunk,
and start a new *feature branch* from that. and start a new *feature branch* from that.
* Make a new branch for each separable set of changes |emdash| "one task, one * Make a new branch for each separable set of changes |emdash| "one task, one
branch" (`ipython git workflow`_). branch" (`ipython git workflow`_).
* Name your branch for the purpose of the changes - e.g. * Name your branch for the purpose of the changes - e.g.
``bugfix-for-issue-14`` or ``refactor-database-code``. ``bugfix-for-issue-14`` or ``refactor-database-code``.
* If you can possibly avoid it, avoid merging trunk or any other branches into * If you can possibly avoid it, avoid merging trunk or any other branches into
your feature branch while you are working. your feature branch while you are working.
* If you do find yourself merging from trunk, consider :ref:`rebase-on-trunk` * If you do find yourself merging from trunk, consider :ref:`rebase-on-trunk`
* Ask on the `scikit-image mailing list`_ if you get stuck. * Ask on the `scikit-image mailing list`_ if you get stuck.
* Ask for code review! * Ask for code review!
This way of working helps to keep work well organized, with readable history. This way of working helps to keep work well organized, with readable history.
This in turn makes it easier for project maintainers (that might be you) to see This in turn makes it easier for project maintainers (that might be you) to see
what you've done, and why you did it. what you've done, and why you did it.
See `linux git workflow`_ and `ipython git workflow`_ for some explanation. See `linux git workflow`_ and `ipython git workflow`_ for some explanation.
Consider deleting your master branch Consider deleting your main branch
==================================== ====================================
It may sound strange, but deleting your own ``master`` branch can help reduce It may sound strange, but deleting your own ``main`` branch can help reduce
confusion about which branch you are on. See `deleting master on github`_ for confusion about which branch you are on. See `deleting master on github`_ for
details. details (replacing `master` with `main`).
.. _update-mirror-trunk: .. _update-mirror-trunk:
Update the mirror of trunk Update the mirror of trunk
========================== ==========================
First make sure you have done :ref:`linking-to-upstream`. First make sure you have done :ref:`linking-to-upstream`.
From time to time you should fetch the upstream (trunk) changes from github:: From time to time you should fetch the upstream (trunk) changes from github::
git fetch upstream git fetch upstream
This will pull down any commits you don't have, and set the remote branches to This will pull down any commits you don't have, and set the remote branches to
point to the right commit. For example, 'trunk' is the branch referred to by point to the right commit. For example, 'trunk' is the branch referred to by
(remote/branchname) ``upstream/master`` - and if there have been commits since (remote/branchname) ``upstream/main`` - and if there have been commits since
you last checked, ``upstream/master`` will change after you do the fetch. you last checked, ``upstream/main`` will change after you do the fetch.
.. _make-feature-branch: .. _make-feature-branch:
Make a new feature branch Make a new feature branch
========================= =========================
When you are ready to make some changes to the code, you should start a new When you are ready to make some changes to the code, you should start a new
branch. Branches that are for a collection of related edits are often called branch. Branches that are for a collection of related edits are often called
'feature branches'. 'feature branches'.
skipping to change at line 80 skipping to change at line 80
Choose an informative name for the branch to remind yourself and the rest of us Choose an informative name for the branch to remind yourself and the rest of us
what the changes in the branch are for. For example ``add-ability-to-fly``, or what the changes in the branch are for. For example ``add-ability-to-fly``, or
``buxfix-for-issue-42``. ``buxfix-for-issue-42``.
:: ::
# Update the mirror of trunk # Update the mirror of trunk
git fetch upstream git fetch upstream
# Make new feature branch starting at current trunk # Make new feature branch starting at current trunk
git branch my-new-feature upstream/master git branch my-new-feature upstream/main
git checkout my-new-feature git checkout my-new-feature
Generally, you will want to keep your feature branches on your public github_ Generally, you will want to keep your feature branches on your public github_
fork of `scikit-image`_. To do this, you `git push`_ this new branch up to your fork of `scikit-image`_. To do this, you `git push`_ this new branch up to your
github repo. Generally (if you followed the instructions in these pages, and by github repo. Generally (if you followed the instructions in these pages, and by
default), git will have a link to your github repo, called ``origin``. You push default), git will have a link to your github repo, called ``origin``. You push
up to your own repo on github with:: up to your own repo on github with::
git push origin my-new-feature git push origin my-new-feature
skipping to change at line 179 skipping to change at line 179
code review. code review.
Some other things you might want to do Some other things you might want to do
====================================== ======================================
Delete a branch on github Delete a branch on github
------------------------- -------------------------
:: ::
git checkout master git checkout main
# delete branch locally # delete branch locally
git branch -D my-unwanted-branch git branch -D my-unwanted-branch
# delete branch on github # delete branch on github
git push origin :my-unwanted-branch git push origin :my-unwanted-branch
(Note the colon ``:`` before ``test-branch``. See also: (Note the colon ``:`` before ``test-branch``. See also:
https://help.github.com/en/github/using-git/managing-remote-repositories https://help.github.com/en/github/using-git/managing-remote-repositories
Several people sharing a single repository Several people sharing a single repository
------------------------------------------ ------------------------------------------
skipping to change at line 216 skipping to change at line 216
git clone git@githhub.com:your-user-name/scikit-image.git git clone git@githhub.com:your-user-name/scikit-image.git
Remember that links starting with ``git@`` use the ssh protocol and are Remember that links starting with ``git@`` use the ssh protocol and are
read-write; links starting with ``git://`` are read-only. read-write; links starting with ``git://`` are read-only.
Your collaborators can then commit directly into that repo with the Your collaborators can then commit directly into that repo with the
usual:: usual::
git commit -am 'ENH - much better code' git commit -am 'ENH - much better code'
git push origin master # pushes directly into your repo git push origin main # pushes directly into your repo
Explore your repository Explore your repository
----------------------- -----------------------
To see a graphical representation of the repository branches and To see a graphical representation of the repository branches and
commits:: commits::
gitk --all gitk --all
To see a linear list of commits for this branch:: To see a linear list of commits for this branch::
skipping to change at line 279 skipping to change at line 279
To do a rebase on trunk:: To do a rebase on trunk::
# Update the mirror of trunk # Update the mirror of trunk
git fetch upstream git fetch upstream
# go to the feature branch # go to the feature branch
git checkout cool-feature git checkout cool-feature
# make a backup in case you mess up # make a backup in case you mess up
git branch tmp cool-feature git branch tmp cool-feature
# rebase cool-feature onto trunk # rebase cool-feature onto trunk
git rebase --onto upstream/master upstream/master cool-feature git rebase --onto upstream/main upstream/main cool-feature
In this situation, where you are already on branch ``cool-feature``, the last In this situation, where you are already on branch ``cool-feature``, the last
command can be written more succinctly as:: command can be written more succinctly as::
git rebase upstream/master git rebase upstream/main
When all looks good you can delete your backup branch:: When all looks good you can delete your backup branch::
git branch -D tmp git branch -D tmp
If it doesn't look good you may need to have a look at If it doesn't look good you may need to have a look at
:ref:`recovering-from-mess-up`. :ref:`recovering-from-mess-up`.
If you have made changes to files that have also changed in trunk, this may If you have made changes to files that have also changed in trunk, this may
generate merge conflicts that you need to resolve - see the `git rebase`_ man generate merge conflicts that you need to resolve - see the `git rebase`_ man
 End of changes. 11 change blocks. 
12 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)