update module2.ipynb

This commit is contained in:
Yavuz Sava 2025-03-07 13:54:24 +03:00
parent c35404342a
commit 8ba165e5eb

View File

@ -1231,7 +1231,120 @@
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Working with branches\n", "# Working with branches\n",
"\n" "\n",
"This reading contains the code used in the instructional videos from [**Working with branches**<svg aria-labelledby=\"cds-react-aria3604314262-:ro2:-title\" fill=\"none\" focusable=\"false\" height=\"16\" role=\"img\" viewBox=\"0 0 20 20\" width=\"16\" class=\"css-8blerm\" id=\"cds-react-aria3604314262-:ro2:\"><title id=\"cds-react-aria3604314262-:ro2:-title\">Opens in a new tab</title></svg>](https://www.coursera.org/learn/introduction-git-github/lecture/UHBEa/working-with-branches)\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 checks\n",
"\n",
"git status\n",
"```\n",
"\n",
"**Code output:**\n",
"\n",
"On branch even-better-feature\n",
"\n",
"nothing to commit, working tree clean\n",
"\n",
"```bash\n",
"ls \\-l\n",
"```\n",
"\n",
"**Code output:**\n",
"\n",
"total 8\n",
"\n",
"\\-rw-rw-r-- 1 user user 659 Jul 17 00:02 disk\\_usage.py\n",
"\n",
"\\-rw-rw-r-- 1 user user  53 Jul 17 15:33 free\\_memory.py\n",
"\n",
"```bash\n",
"git checkout master\n",
"\n",
"git log \\-2\n",
"```\n",
"\n",
"**Code output:**\n",
"\n",
"Switched to branch 'master'\n",
"\n",
"user@ubuntu:~/checks$ git log -2\n",
"\n",
"commit 80b2dacef4b567196e61651064f03089c5e70b5e (HEAD -> master, new-feature)\n",
"\n",
"Author: My name <me@example.com>\n",
"\n",
"Date:   Wed Jul 17 00:02:39 2019 +0200\n",
"\n",
"    Revert \"New name for disk\\_usage.py\"\n",
"\n",
"    Rollback reason: the previous name was actually better.\n",
"\n",
"    This reverts commit 7d7167b2db44abf8cf014230f9b9708786e41c2a.\n",
"\n",
"commit abb063210c1f011b0d6470a4c5f1d8f672edd3ef\n",
"\n",
"Author: My name <me@example.com>\n",
"\n",
"Date:   Mon Jul 15 22:20:45 2019 +0200\n",
"\n",
"    Add a gitignore file, ignoring .DS\\_STORE files\n",
"\n",
"```bash\n",
"ls \\-l\n",
"```\n",
"\n",
"**Code output:**\n",
"\n",
"total 4\n",
"\n",
"\\-rw-rw-r-- 1 user user 659 Jul 17 00:02 disk\\_usage.py\n",
"\n",
"```bash\n",
"git branch\n",
"```\n",
"\n",
"**Code output:**\n",
"\n",
"  even-better-feature\n",
"\n",
"\\* master\n",
"\n",
"  new-feature\n",
"\n",
"```bash\n",
"git branch \\-d new\\-feature \n",
"```\n",
"\n",
"**Code output:**\n",
"\n",
"Deleted branch new-feature (was 80b2dac).\n",
"\n",
"```bash\n",
"git branch\n",
"```\n",
"\n",
"**Code output:**\n",
"\n",
"  even-better-feature\n",
"\n",
"\\* master\n",
"\n",
"```bash\n",
"git branch \\-d even\\-better-feature \n",
"```\n",
"\n",
"**Code output:**\n",
"\n",
"error: The branch 'even-better-feature' is not fully merged.\n",
"\n",
"If you are sure you want to delete it, run 'git branch -D even-better-feature'."
] ]
}, },
{ {