update module1.ipynb
This commit is contained in:
parent
787e8a9052
commit
2626de0850
157
module1.ipynb
157
module1.ipynb
@ -646,7 +646,162 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": []
|
||||
"source": [
|
||||
"# First steps with Git\n",
|
||||
"\n",
|
||||
"This reading contains the code used in the instructional videos from [**First steps with Git**<svg aria-labelledby=\"cds-react-aria8737541281-:r1jh:-title\" fill=\"none\" focusable=\"false\" height=\"16\" role=\"img\" viewBox=\"0 0 20 20\" width=\"16\" class=\"css-8blerm\" id=\"cds-react-aria8737541281-:r1jh:\"><title id=\"cds-react-aria8737541281-:r1jh:-title\">Opens in a new tab</title><path d=\"M4.5 17c-.412 0-.766-.147-1.06-.44A1.445 1.445 0 013 15.5v-11c0-.412.147-.766.44-1.06.294-.293.648-.44 1.06-.44h4.75c.213 0 .39.071.534.214a.72.72 0 01.216.532c0 .21-.072.39-.216.535a.72.72 0 01-.534.219H4.5v11h11v-4.75c0-.213.072-.39.214-.534a.72.72 0 01.532-.216c.21 0 .39.072.535.216a.72.72 0 01.219.534v4.75c0 .412-.147.766-.44 1.06-.294.293-.647.44-1.06.44h-11zm11-11.438L8.583 12.48a.681.681 0 01-.52.219.758.758 0 01-.521-.24.729.729 0 010-1.062L14.438 4.5H12.75a.728.728 0 01-.534-.214.72.72 0 01-.216-.532c0-.21.072-.39.216-.535A.72.72 0 0112.75 3h3.5c.212 0 .39.072.534.216A.726.726 0 0117 3.75v3.5c0 .213-.072.39-.214.534a.72.72 0 01-.532.216.734.734 0 01-.535-.216.72.72 0 01-.219-.534V5.562z\" fill=\"currentColor\" data-darkreader-inline-fill=\"\" style=\"--darkreader-inline-fill: currentColor;\"></path></svg>](https://www.coursera.org/learn/introduction-git-github/lecture/2xrXl/first-steps-with-git)**.** \n",
|
||||
"\n",
|
||||
"## Introduction\n",
|
||||
"\n",
|
||||
"This follow-along reading is organized to match the content in the video that follows. It contains the same code shown in the next video. These code blocks will provide you with the opportunity to see how the code is written and can be used as a reference as you work through the course. \n",
|
||||
"\n",
|
||||
"You can follow along in the reading as the instructor discusses the code or review the code after watching the video.\n",
|
||||
"\n",
|
||||
"```bash\n",
|
||||
"git config \\--global user.email \"me@example.com\"\n",
|
||||
"\n",
|
||||
"git config \\--global user.name \"My name\"\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"```bash\n",
|
||||
"mkdir checks\n",
|
||||
"\n",
|
||||
"cd checks\n",
|
||||
"\n",
|
||||
"git init\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"**Code output:**\n",
|
||||
"\n",
|
||||
"Initialized empty Git repository in /home/user/checks/.git/\n",
|
||||
"\n",
|
||||
"```bash\n",
|
||||
"ls \\-la\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"**Code output:**\n",
|
||||
"\n",
|
||||
"total 12\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 3 user user 4096 Jul 9 18:16 .\n",
|
||||
"\n",
|
||||
"drwxr-xr-x 18 user user 4096 Jul 9 18:16 ..\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 7 user user 4096 Jul 9 18:16 .git\n",
|
||||
"\n",
|
||||
"user@ubuntu:~/checks$ ls -l .git/\n",
|
||||
"\n",
|
||||
"total 32\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 2 user user 4096 Jul 9 18:16 branches\n",
|
||||
"\n",
|
||||
"\\-rw-rw-r-- 1 user user 92 Jul 9 18:16 config\n",
|
||||
"\n",
|
||||
"\\-rw-rw-r-- 1 user user 73 Jul 9 18:16 description\n",
|
||||
"\n",
|
||||
"\\-rw-rw-r-- 1 user user 23 Jul 9 18:16 HEAD\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 2 user user 4096 Jul 9 18:16 hooks\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 2 user user 4096 Jul 9 18:16 info\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 4 user user 4096 Jul 9 18:16 objects\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 4 user user 4096 Jul 9 18:16 refs\n",
|
||||
"\n",
|
||||
"```bash\n",
|
||||
"ls \\-l\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"**Code output:**\n",
|
||||
"\n",
|
||||
"total 4\n",
|
||||
"\n",
|
||||
"\\-rw-rw-r-- 1 user user 657 Jul 9 18:26 disk\\_usage.py\n",
|
||||
"\n",
|
||||
"1\n",
|
||||
"\n",
|
||||
"ls \\-l .git/\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"**Code output:**\n",
|
||||
"\n",
|
||||
"total 32\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 2 user user 4096 Jul 9 18:16 branches\n",
|
||||
"\n",
|
||||
"\\-rw-rw-r-- 1 user user 92 Jul 9 18:16 config\n",
|
||||
"\n",
|
||||
"\\-rw-rw-r-- 1 user user 73 Jul 9 18:16 description\n",
|
||||
"\n",
|
||||
"\\-rw-rw-r-- 1 user user 23 Jul 9 18:16 HEAD\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 2 user user 4096 Jul 9 18:16 hooks\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 2 user user 4096 Jul 9 18:16 info\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 4 user user 4096 Jul 9 18:16 objects\n",
|
||||
"\n",
|
||||
"drwxrwxr-x 4 user user 4096 Jul 9 18:16 refs\n",
|
||||
"\n",
|
||||
"```bash\n",
|
||||
"cp ../disk\\_usage.py .\n",
|
||||
"\n",
|
||||
"ls \\-l\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"**Code output:**\n",
|
||||
"\n",
|
||||
"total 4\n",
|
||||
"\n",
|
||||
"\\-rw-rw-r-- 1 user user 657 Jul 9 18:26 disk\\_usage.py\n",
|
||||
"\n",
|
||||
"```bash\n",
|
||||
"git add disk\\_usage.py \n",
|
||||
"\n",
|
||||
"git status\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"**Code output:**\n",
|
||||
"\n",
|
||||
"On branch master\n",
|
||||
"\n",
|
||||
"No commits yet\n",
|
||||
"\n",
|
||||
"Changes to be committed:\n",
|
||||
"\n",
|
||||
" (use \"git rm --cached <file>...\" to unstage)\n",
|
||||
"\n",
|
||||
"new file: disk\\_usage.py\n",
|
||||
"\n",
|
||||
"```bash\n",
|
||||
"git commit\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"**Code output:**\n",
|
||||
"\n",
|
||||
" GNU nano 3.2 /home/user/checks/.git/COMMIT\\_EDITMSG \n",
|
||||
"\n",
|
||||
"```\n",
|
||||
"\\# Please enter the commit message for your changes. Lines starting\n",
|
||||
"\n",
|
||||
"\\# with '#' will be ignored, and an empty message aborts the commit.\n",
|
||||
"\n",
|
||||
"#\n",
|
||||
"\n",
|
||||
"\\# On branch master\n",
|
||||
"\n",
|
||||
"#\n",
|
||||
"\n",
|
||||
"\\# Initial commit\n",
|
||||
"\n",
|
||||
"#\n",
|
||||
"\n",
|
||||
"\\# Changes to be committed:\n",
|
||||
"\n",
|
||||
"\\# new file: disk\\_usage.py\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
|
Loading…
Reference in New Issue
Block a user