From 3c9b7e493b6016754247f967c250c2e510f7f1b2 Mon Sep 17 00:00:00 2001 From: Woose Date: Tue, 4 Mar 2025 18:56:38 +0300 Subject: [PATCH] update module2.ipynb --- module2.ipynb | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/module2.ipynb b/module2.ipynb index 383ff79..abdad4c 100644 --- a/module2.ipynb +++ b/module2.ipynb @@ -494,7 +494,27 @@ "metadata": {}, "source": [ "# Study Guide: Advanced Git\n", - "\n" + "\n", + "| Command | Explanation & Link |\n", + "| --- | --- |\n", + "| git commit -a | [$ git commit -aOpens in a new tab](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---all) automatically stages the files that have been locally modified. New files which have not been published yet are not affected. |\n", + "| git log -p | [$ git log -pOpens in a new tab](https://git-scm.com/docs/git-log#generate_patch_text_with_p) produces patch text that displays the lines of code that were changed in each commit in the current repo. |\n", + "| git show | [$ git showOpens in a new tab](https://git-scm.com/docs/git-show) shows you one or more object(s) such as blobs, trees, tags, and commits. |\n", + "| git diff | [$ git diffOpens in a new tab](https://git-scm.com/docs/git-diff) is similar to the Linux \\`diff\\` command, and can show the changes between commits, changes between the working tree and index, changes between two trees, changes from a merge, and so on. |\n", + "| git diff --staged | [$ git diff --stagedOpens in a new tab](https://git-scm.com/docs/git-diff) is an alias of $ git diff --cached, which  shows all staged files compared to the named commit. |\n", + "| git add -p | [$ git add -pOpens in a new tab](https://git-scm.com/docs/git-add) allows a user to interactively review patches before adding to the current commit. |\n", + "| git mv | [$ git mvOpens in a new tab](https://git-scm.com/docs/git-mv) is similar to the Linux \\`mv\\` command. This command can move or rename a file, directory, or symlink. |\n", + "| git rm | [$ git rm Opens in a new tab](https://git-scm.com/docs/git-rm)is similar to the Linux \\`rm\\` command. This command deletes or removes a file from the working tree. |\n", + "\n", + "There are many useful git command summaries online as well. Please take some time to research and study a few, such as [this oneOpens in a new tab](https://education.github.com/git-cheat-sheet-education.pdf).\n", + "\n", + "## .gitignore files\n", + "\n", + ".gitignore files are used to tell the git tool to intentionally ignore some files in a given Git repository. For example, this can be useful for configuration files or metadata files that a user may not want to check into the master branch. \n", + "\n", + "When writing a .gitignore file, there are some specific formats which help tell Git how to read the text in the file. For example, a line starting with # is a comment; a slash / is a directory separator. Visit [https://git-scm.com/docs/gitignoreOpens in a new tab](https://git-scm.com/docs/gitignore) to see more examples.\n", + "\n", + "[This GitHub repositoryOpens in a new tab](https://gist.github.com/octocat/9257657) offers some examples of configurations which are often included in a .gitignore file. These examples include: compiled sources, packages, logs, databases, and OS generated files." ] }, {