Skip to content

Commit

Permalink
Fixed #995 Added instructions for pulling main into dev branch (#1028)
Browse files Browse the repository at this point in the history
* [#995] added instructions for pulling main into dev branch

* [#995] enabled dropdown with sphinx-togglebutton

* [#995] added instructions for pulling main into dev branch

* [#995] updated code cell section to render correctly
  • Loading branch information
joehiggi1758 authored Sep 16, 2024
1 parent 692c99c commit b7b355c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/Contribute.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,43 @@
"![Fetch Upstream Fork](images/fetch_upstream_fork.png) "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
":::{admonition} Instructions for Pulling Main into a Development Branch\n",
":class: toggle\n",
"1. Open a terminal\n",
"2. Change the current working directory to your local development repository (e.g., cd Git/stumpy_dev.git)\n",
"3. Check out your local development branch (e.g., git switch some_new_feature)\n",
"4. Commit all changes in your local development branch (e.g., git add some_file.py and git commit)\n",
"5. Fetch the branches and their respective commits from the upstream repository (e.g., git fetch upstream)\n",
"6. Check out your fork's local default branch (e.g., git checkout main)\n",
"7. Merge the changes from the upstream default branch - in this case, upstream/main - into your local default branch (e.g., git merge upstream/main). This brings your fork's default branch into sync with the upstream repository, without losing your local changes.\n",
"8. If your local main branch didn't have any unique commits, Git will perform a fast-forward. Otherwise, if your local main branch had unique commits, you may need to resolve conflicts. Note that this does not affect your development branch!\n",
"9. Next, switch over to your development branch (e.g., git switch some_new_feature)\n",
"10. Finally, merge the main branch into your development branch (e.g., git merge main)\n",
" - You may see something like the following, if you do, you will need to open up the files tagged with CONFLICT and resolve the merge conflicts. Once that's done, you will need to commit the changes and push the commit (e.g., git push) back to Github.\n",
"\n",
"```\n",
"git merge main\n",
"Auto-merging stumpy/aamp_stimp.py\n",
"Auto-merging stumpy/core.py\n",
"Auto-merging stumpy/mpdist.py\n",
"CONFLICT (content): Merge conflict in stumpy/mpdist.py\n",
"Auto-merging stumpy/mstumped.py\n",
"CONFLICT (content): Merge conflict in stumpy/mstumped.py\n",
"Auto-merging stumpy/ostinato.py\n",
"Auto-merging stumpy/stimp.py\n",
"CONFLICT (content): Merge conflict in stumpy/stimp.py\n",
"Auto-merging stumpy/stumped.py\n",
"CONFLICT (content): Merge conflict in stumpy/stumped.py\n",
"Automatic merge failed; fix conflicts and then commit the result.\n",
"You will need to open up the files tagged with CONFLICT and resolve the merge conflicts. Once that's done, you will need to commit the changes and push the commit (e.g., git push) back to Github.\n",
"```\n",
":::"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx_togglebutton",
"numpydoc",
"myst_nb",
]
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ scikit-learn
numpydoc
myst-nb
jupyterlab-myst
sphinx-togglebutton

0 comments on commit b7b355c

Please sign in to comment.