update module2.ipynb
This commit is contained in:
parent
964d07c3bf
commit
02395f2d7e
142
module2.ipynb
142
module2.ipynb
@ -662,13 +662,151 @@
|
|||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"# "
|
"# Amending commits\n",
|
||||||
|
"\n",
|
||||||
|
"This reading contains the code used in the instructional videos from [**Amending commits**<svg aria-labelledby=\"cds-react-aria2659598955-:rkc:-title\" fill=\"none\" focusable=\"false\" height=\"16\" role=\"img\" viewBox=\"0 0 20 20\" width=\"16\" class=\"css-8blerm\" id=\"cds-react-aria2659598955-:rkc:\"><title id=\"cds-react-aria2659598955-:rkc:-title\">Opens in a new tab</title></svg>](https://www.coursera.org/learn/introduction-git-github/lecture/nT1S2/amending-commits)\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",
|
||||||
|
"cd scripts/\n",
|
||||||
|
"\n",
|
||||||
|
"touch auto\\-update.py\n",
|
||||||
|
"\n",
|
||||||
|
"touch gather\\-information.sh\n",
|
||||||
|
"\n",
|
||||||
|
"ls \\-l\n",
|
||||||
|
"```\n",
|
||||||
|
"\n",
|
||||||
|
"**Code output:**\n",
|
||||||
|
"\n",
|
||||||
|
"total 8\n",
|
||||||
|
"\n",
|
||||||
|
"\\-rwxrwxr-x 1 user user 319 Jul 16 17:56 all\\_checks.py\n",
|
||||||
|
"\n",
|
||||||
|
"\\-rw-rw-r-- 1 user user 0 Jul 16 20:19 auto-update.py\n",
|
||||||
|
"\n",
|
||||||
|
"\\-rw-rw-r-- 1 user user 0 Jul 16 20:19 gather-information.sh\n",
|
||||||
|
"\n",
|
||||||
|
"\\-rw-rw-r-- 1 user user 15 Jul 16 18:03 output.txt\n",
|
||||||
|
"\n",
|
||||||
|
"user@ubuntu:~/scripts$ git add auto-update.py \n",
|
||||||
|
"\n",
|
||||||
|
"user@ubuntu:~/scripts$ git commit -m 'Add two new scripts'\n",
|
||||||
|
"\n",
|
||||||
|
"\\[master 9c78761\\] Add two new scripts\n",
|
||||||
|
"\n",
|
||||||
|
" 1 file changed, 0 insertions(+), 0 deletions(-)\n",
|
||||||
|
"\n",
|
||||||
|
" create mode 100644 [auto-update.py<svg aria-labelledby=\"cds-react-aria2659598955-:rkj:-title\" fill=\"none\" focusable=\"false\" height=\"16\" role=\"img\" viewBox=\"0 0 20 20\" width=\"16\" class=\"css-8blerm\" id=\"cds-react-aria2659598955-:rkj:\"><title id=\"cds-react-aria2659598955-:rkj:-title\">Opens in a new tab</title></svg>](http://auto-update.py/)\n",
|
||||||
|
"\n",
|
||||||
|
"```bash\n",
|
||||||
|
"git add auto\\-update.py\n",
|
||||||
|
"\n",
|
||||||
|
"git commit \\-m 'Add two new scripts'\n",
|
||||||
|
"```\n",
|
||||||
|
"\n",
|
||||||
|
"**Code output:**\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",
|
||||||
|
"\\# Date: Tue Jul 16 20:20:24 2019 +0200\n",
|
||||||
|
"\n",
|
||||||
|
"\\# On branch master\n",
|
||||||
|
"\n",
|
||||||
|
"\\# Changes to be committed:\n",
|
||||||
|
"\n",
|
||||||
|
"\\# new file: auto-update.py\n",
|
||||||
|
"\n",
|
||||||
|
"\\# new file: gather-information.sh\n",
|
||||||
|
"\n",
|
||||||
|
"\\# Untracked files:\n",
|
||||||
|
"\n",
|
||||||
|
"\\# output.txt\n",
|
||||||
|
"\n",
|
||||||
|
"```bash\n",
|
||||||
|
"git add gather\\-information.sh\n",
|
||||||
|
"\n",
|
||||||
|
"git commit \\--amend\n",
|
||||||
|
"```\n",
|
||||||
|
"\n",
|
||||||
|
"## File in video\n",
|
||||||
|
"\n",
|
||||||
|
"```bash\n",
|
||||||
|
"Add two new scripts.\n",
|
||||||
|
"\n",
|
||||||
|
"# Please enter the commit message for your changes. Line starting\n",
|
||||||
|
"\n",
|
||||||
|
"#with '#' will be ignored, and an empty message aborts the commit.\n",
|
||||||
|
"\n",
|
||||||
|
"#\n",
|
||||||
|
"\n",
|
||||||
|
"#Date: Mon Jan 6 08:28:17 2020 -0800\n",
|
||||||
|
"\n",
|
||||||
|
"#\n",
|
||||||
|
"\n",
|
||||||
|
"# On branch master\n",
|
||||||
|
"\n",
|
||||||
|
"# Changes to be committed:\n",
|
||||||
|
"\n",
|
||||||
|
"# new file: auto-update.py\n",
|
||||||
|
"\n",
|
||||||
|
"# new file: gather-information.sh\n",
|
||||||
|
"\n",
|
||||||
|
"#\n",
|
||||||
|
"\n",
|
||||||
|
"# Untracked files:\n",
|
||||||
|
"\n",
|
||||||
|
"# output.txt\n",
|
||||||
|
"```\n",
|
||||||
|
"\n",
|
||||||
|
"## File in video\n",
|
||||||
|
"\n",
|
||||||
|
"```bash\n",
|
||||||
|
"Add two new scripts.\n",
|
||||||
|
"\n",
|
||||||
|
"gather\\-information.sh will collect information in case of errors.\n",
|
||||||
|
"\n",
|
||||||
|
"auto\\-update.py will run daily to update computers automatically.\n",
|
||||||
|
"\n",
|
||||||
|
"# Please enter the commit message for your changes. Line starting\n",
|
||||||
|
"\n",
|
||||||
|
"#with '#' will be ignored, and an empty message aborts the commit.\n",
|
||||||
|
"\n",
|
||||||
|
"#\n",
|
||||||
|
"\n",
|
||||||
|
"#Date: Mon Jan 6 08:28:17 2020 -0800\n",
|
||||||
|
"\n",
|
||||||
|
"#\n",
|
||||||
|
"\n",
|
||||||
|
"# On branch master\n",
|
||||||
|
"\n",
|
||||||
|
"# Changes to be committed:\n",
|
||||||
|
"\n",
|
||||||
|
"# new file: auto-update.py\n",
|
||||||
|
"\n",
|
||||||
|
"# new file: gather-information.sh\n",
|
||||||
|
"\n",
|
||||||
|
"#\n",
|
||||||
|
"\n",
|
||||||
|
"# Untracked files:\n",
|
||||||
|
"\n",
|
||||||
|
"# output.txt\n",
|
||||||
|
"```"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": []
|
"source": [
|
||||||
|
"# "
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
Loading…
Reference in New Issue
Block a user