Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Update and add links to section on reading git history.

Lauryn Menarddf0925caf276
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0856ae60675..4715da812fa 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -236,7 +236,7 @@ want to take some time to familiarize yourself with the code.
reading to see how it works and how the codebase is organized.
[graphical Git viewer]: https://zulip.readthedocs.io/en/latest/git/setup.html#get-a-graphical-client
-[git-log-secret]: https://github.com/zulip/zulip-mobile/blob/main/docs/howto/git.md#git-log-secret
+[git-log-secret]: https://zulip.readthedocs.io/en/latest/git/reading-history.html#the-secret-to-using-git-log-p
#### Desktop app
diff --git a/docs/contributing/commit-discipline.md b/docs/contributing/commit-discipline.md
index c7f9233565f..afc3fb37547 100644
--- a/docs/contributing/commit-discipline.md
+++ b/docs/contributing/commit-discipline.md
@@ -10,6 +10,9 @@ helps a lot in preventing bugs.
Use `git rebase -i` as much as you need to shape your commit structure. See the
[Git guide](../git/overview.md) for useful resources on mastering Git.
+**Tip**: Check out how to use [`git log -p` to study the commit
+history](../git/reading-history.md) of the project.
+
## Each commit must be coherent
- It should pass tests (so test updates needed by a change should be
diff --git a/docs/git/cheat-sheet.md b/docs/git/cheat-sheet.md
index 253eca702df..c0d53040648 100644
--- a/docs/git/cheat-sheet.md
+++ b/docs/git/cheat-sheet.md
@@ -83,6 +83,7 @@ See also [fixing commits][fix-commit]
- log
- `git log`: show commit logs
- `git log --oneline | head`: To quickly see the latest ten commits on a branch.
+ - `git log -p`: show commit logs with changes; see [the "secret" to reading it's output][git-log-secret]
- pull
- `git pull --rebase`: rebase your changes on top of `main`.
- `git pull` (with no options): Will either create a merge commit
@@ -112,5 +113,6 @@ See also [fixing commits][fix-commit]
- `git status`: show the working tree status, unstaged and staged files
[fix-commit]: fixing-commits.md
+[git-log-secret]: reading-history.md#the-secret-to-using-git-log--p
[git-config-clone]: cloning.md#step-1b-clone-to-your-machine
[git-overview]: overview.md