Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 86b6571

Browse filesBrowse files
Add information about .gitignore (empa-scientific-it#110)
Co-authored-by: Edoardo Baldi <edoardob90@gmail.com>
1 parent da295f8 commit 86b6571
Copy full SHA for 86b6571

File tree

Expand file treeCollapse file tree

1 file changed

+13
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-5
lines changed

‎modules_and_packages.ipynb

Copy file name to clipboardExpand all lines: modules_and_packages.ipynb
+13-5Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@
832832
]
833833
},
834834
{
835+
"attachments": {},
835836
"cell_type": "markdown",
836837
"metadata": {
837838
"tags": []
@@ -844,20 +845,27 @@
844845
"```bash\n",
845846
" $ git init\n",
846847
"```\n",
847-
"3. Run the following command to add all files to the staging area:\n",
848+
"3. Create a new file named `.gitignore` (do **not** forget the leading `.`) in the package directory with the following content to exclude some temporary files from the repository:\n",
849+
"```\n",
850+
" .ipynb_checkpoints\n",
851+
" __pycache__\n",
852+
"```\n",
853+
"4. Run the following command to add all files to the staging area:\n",
848854
"```bash\n",
849855
" $ git add .\n",
850856
"```\n",
851857
"<div class=\"alert alert-block alert-warning\">\n",
852-
"<b>Warning:</b> the dot (<code>.</code>) means <b>all files</b> in the current directory. If you have any files that you don't want to add to the Git repository, remove them from the directory before running the command above.\n",
858+
"<b>Warning:</b> the dot (<code>.</code>) means <b>all files</b> in the current directory **except** those listed in the <code>.gitignore</code> file.\n",
859+
"Git does not track files that are listed in the <code>.gitignore</code> file.\n",
860+
"The <code>.gitignore</code> file, however, should be committed to the repository.\n",
853861
"</div>\n",
854862
"\n",
855-
"4. Review the changes that will be committed:\n",
863+
"5. Review the changes that will be committed:\n",
856864
"```bash\n",
857865
" $ git status\n",
858866
"```\n",
859867
"\n",
860-
"5. Run the following command to commit the changes:\n",
868+
"6. Run the following command to commit the changes:\n",
861869
"```bash\n",
862870
" $ git commit -m \"Initial commit\"\n",
863871
"```\n",
@@ -978,7 +986,7 @@
978986
"name": "python",
979987
"nbconvert_exporter": "python",
980988
"pygments_lexer": "ipython3",
981-
"version": "3.11.1"
989+
"version": "3.9.6"
982990
},
983991
"vscode": {
984992
"interpreter": {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.