diff --git a/module1.ipynb b/module1.ipynb index 3cd0cc7..a5a0e78 100644 --- a/module1.ipynb +++ b/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**Opens in a new tab](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 ...\" 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",