You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To securely connect with GitHub, you'll need to add your SSH key to your GitHub account. Here you can find how to `add your public key <https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account>`_ .
11
+
12
+
2. Clone a GitHub Repository
13
+
____________________________
14
+
15
+
Navigate to the directory where you want to download the repository, then use the :code:`git clone` command:
After pushing your changes, you should see a message indicating the recent pushes. Click on **"Compare & pull request"**.
93
+
94
+
On the right side of the page, select your reviewers, and add a description if needed. This will create a pull request for your changes to be reviewed and merged.
95
+
96
+
97
+
7. Delete the Branch Locally (Optional)
98
+
_______________________________________
99
+
100
+
If you no longer need the branch locally, you can delete it:
101
+
102
+
.. code:: bash
103
+
104
+
git branch -d update_readme
105
+
106
+
107
+
Modifying the HTML Webpage
108
+
---------------------------
109
+
110
+
1. Compile the HTML Webpage Locally
111
+
____________________________________
112
+
113
+
To compile the HTML files locally, navigate to the parent directory of your project and run:
114
+
115
+
.. code-block:: bash
116
+
117
+
make html
118
+
119
+
This command will generate the HTML files for your webpage.
120
+
121
+
**Troubleshooting:**
122
+
123
+
- If the ``make html`` command fails, you might need to install the necessary dependencies first. You can do this by running:
124
+
125
+
.. code-block:: bash
126
+
127
+
pip install -r requirements.txt
128
+
129
+
2. View the Compiled HTML
130
+
__________________________
131
+
132
+
Once the compilation is successful, you can view the HTML files by navigating to the ``docs/build/html`` directory. Open the files in this folder with your preferred web browser to see your webpage.
133
+
134
+
3. Modify the Documentation
135
+
____________________________
136
+
137
+
**Important:**
138
+
139
+
- **Never modify files directly in the** ``html`` **folder.**
140
+
- Always make changes in the ``docs/source`` folder, which contains the source files used to generate the HTML.
141
+
142
+
**Steps for Modifying Content:**
143
+
144
+
1. **Create a New** ``.rst`` **File:**
145
+
146
+
If you need to add new content, you can create a new ``.rst`` file in the ``docs/source`` directory. Use an existing file, such as ``oar.rst``, as a template for the new file.
147
+
148
+
- **Formatting Tips:** For guidance on formatting ``.rst`` files, refer to `appropriate documentation <https://developer.lsst.io/restructuredtext/style.html>`_.
149
+
150
+
151
+
2. **Update the** ``index.rst`` **File:**
152
+
153
+
After adding or modifying ``.rst`` files, update the ``index.rst`` file to include your new content in the table of contents or navigation structure.
154
+
155
+
4. Re-compile the HTML Webpage
156
+
_______________________________
157
+
158
+
Once you've made your changes, recompile the HTML files by running ``make html`` again from the parent directory (``docs``), where the ``make.bat`` file is located:
159
+
160
+
.. code-block:: bash
161
+
162
+
make html
163
+
164
+
This will regenerate the HTML files with your latest modifications.
165
+
166
+
5. Commit and Push Changes
167
+
__________________________
168
+
169
+
After confirming your changes are reflected in the compiled HTML, it's time to commit and push your changes to the repository. For detailed instructions on how to commit and push changes, see see `Getting Started with Git and GitHub <#getting-started-with-git-and-github>`_.
Copy file name to clipboardExpand all lines: git.html
+160Lines changed: 160 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,135 @@
113
113
<mainrole="main" id="main">
114
114
<sectionid="git-tips">
115
115
<h1>GIT tips<aclass="headerlink" href="#git-tips" title="Link to this heading">¶</a></h1>
116
+
<sectionid="getting-started-with-git-and-github">
117
+
<h2>Getting Started with Git and GitHub<aclass="headerlink" href="#getting-started-with-git-and-github" title="Link to this heading">¶</a></h2>
118
+
<sectionid="set-up-your-ssh-key">
119
+
<h3>1. Set Up Your SSH Key<aclass="headerlink" href="#set-up-your-ssh-key" title="Link to this heading">¶</a></h3>
120
+
<p>To securely connect with GitHub, you’ll need to add your SSH key to your GitHub account. Here you can find how to <aclass="reference external" href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account">add your public key</a> .</p>
121
+
</section>
122
+
<sectionid="clone-a-github-repository">
123
+
<h3>2. Clone a GitHub Repository<aclass="headerlink" href="#clone-a-github-repository" title="Link to this heading">¶</a></h3>
124
+
<p>Navigate to the directory where you want to download the repository, then use the <codeclass="code docutils literal notranslate"><spanclass="pre">git</span><spanclass="pre">clone</span></code> command:</p>
<h3>4. Create and Switch to a New Branch<aclass="headerlink" href="#create-and-switch-to-a-new-branch" title="Link to this heading">¶</a></h3>
139
+
<p>To make changes without affecting the main branch, create a new branch and switch to it. Let’s make a test updating <cite>README.md</cite> file.</p>
<p>After pushing your changes, you should see a message indicating the recent pushes. Click on <strong>“Compare & pull request”</strong>.</p>
180
+
<p>On the right side of the page, select your reviewers, and add a description if needed. This will create a pull request for your changes to be reviewed and merged.</p>
181
+
</section>
182
+
<sectionid="delete-the-branch-locally-optional">
183
+
<h3>7. Delete the Branch Locally (Optional)<aclass="headerlink" href="#delete-the-branch-locally-optional" title="Link to this heading">¶</a></h3>
184
+
<p>If you no longer need the branch locally, you can delete it:</p>
<p>This command will generate the HTML files for your webpage.</p>
199
+
<p><strong>Troubleshooting:</strong></p>
200
+
<ul>
201
+
<li><p>If the <codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">html</span></code> command fails, you might need to install the necessary dependencies first. You can do this by running:</p>
<h3>2. View the Compiled HTML<aclass="headerlink" href="#view-the-compiled-html" title="Link to this heading">¶</a></h3>
210
+
<p>Once the compilation is successful, you can view the HTML files by navigating to the <codeclass="docutils literal notranslate"><spanclass="pre">docs/build/html</span></code> directory. Open the files in this folder with your preferred web browser to see your webpage.</p>
211
+
</section>
212
+
<sectionid="modify-the-documentation">
213
+
<h3>3. Modify the Documentation<aclass="headerlink" href="#modify-the-documentation" title="Link to this heading">¶</a></h3>
214
+
<p><strong>Important:</strong></p>
215
+
<ulclass="simple">
216
+
<li><p><strong>Never modify files directly in the</strong><codeclass="docutils literal notranslate"><spanclass="pre">html</span></code><strong>folder.</strong></p></li>
217
+
<li><p>Always make changes in the <codeclass="docutils literal notranslate"><spanclass="pre">docs/source</span></code> folder, which contains the source files used to generate the HTML.</p></li>
218
+
</ul>
219
+
<p><strong>Steps for Modifying Content:</strong></p>
220
+
<olclass="arabic">
221
+
<li><p><strong>Create a New</strong><codeclass="docutils literal notranslate"><spanclass="pre">.rst</span></code><strong>File:</strong></p>
222
+
<p>If you need to add new content, you can create a new <codeclass="docutils literal notranslate"><spanclass="pre">.rst</span></code> file in the <codeclass="docutils literal notranslate"><spanclass="pre">docs/source</span></code> directory. Use an existing file, such as <codeclass="docutils literal notranslate"><spanclass="pre">oar.rst</span></code>, as a template for the new file.</p>
223
+
<ulclass="simple">
224
+
<li><p><strong>Formatting Tips:</strong> For guidance on formatting <codeclass="docutils literal notranslate"><spanclass="pre">.rst</span></code> files, refer to <aclass="reference external" href="https://developer.lsst.io/restructuredtext/style.html">appropriate documentation</a>.</p></li>
<p>After adding or modifying <codeclass="docutils literal notranslate"><spanclass="pre">.rst</span></code> files, update the <codeclass="docutils literal notranslate"><spanclass="pre">index.rst</span></code> file to include your new content in the table of contents or navigation structure.</p>
229
+
</li>
230
+
</ol>
231
+
</section>
232
+
<sectionid="re-compile-the-html-webpage">
233
+
<h3>4. Re-compile the HTML Webpage<aclass="headerlink" href="#re-compile-the-html-webpage" title="Link to this heading">¶</a></h3>
234
+
<p>Once you’ve made your changes, recompile the HTML files by running <codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">html</span></code> again from the parent directory (<codeclass="docutils literal notranslate"><spanclass="pre">docs</span></code>), where the <codeclass="docutils literal notranslate"><spanclass="pre">make.bat</span></code> file is located:</p>
<p>This will regenerate the HTML files with your latest modifications.</p>
239
+
</section>
240
+
<sectionid="id1">
241
+
<h3>5. Commit and Push Changes<aclass="headerlink" href="#id1" title="Link to this heading">¶</a></h3>
242
+
<p>After confirming your changes are reflected in the compiled HTML, it’s time to commit and push your changes to the repository. For detailed instructions on how to commit and push changes, see see <aclass="reference external" href="#getting-started-with-git-and-github">Getting Started with Git and GitHub</a>.</p>
243
+
</section>
244
+
</section>
116
245
</section>
117
246
118
247
</main>
@@ -123,6 +252,37 @@ <h1>GIT tips<a class="headerlink" href="#git-tips" title="Link to this heading">
0 commit comments