diff --git a/contents/git-request-pull.md b/contents/git-request-pull.md index 240e2be..cc0fb83 100644 --- a/contents/git-request-pull.md +++ b/contents/git-request-pull.md @@ -17,6 +17,30 @@ git request-pull ``` #### Examples +- **Generates a summary like: + +The following changes since commit 1234567... (main): + + Some previous commit message + +are available in the Git repository at: + + https://github.com/example/repo.git feature-branch + +for you to fetch changes up to 89abcde... (feature-branch): + + New feature commit message + Another commit message + +---------------------------------------------------------------- + file1.txt | 10 ++++++++++ + file2.js | 5 +++++ + 2 files changed, 15 insertions(+)** + + +```sh +git request-pull main https://github.com/example/repo.git feature-branch +``` - **Generate a pull request message from v1.0 to v1.1.** diff --git a/toc-source.json b/toc-source.json index a7bbb88..67a0019 100644 --- a/toc-source.json +++ b/toc-source.json @@ -56,6 +56,10 @@ "long_description": "`git request-pull` generates a summary message describing the changes between two commits, which you can send to a project maintainer to request that they pull your changes. This is especially useful for email-based workflows or when collaborating outside of platforms like GitHub. The command outputs a message that includes a comparison summary, a list of commits, and their messages, making it easy for maintainers to review and apply your changes.", "command": "git request-pull ", "examples": [ + { + "code": "git request-pull main https://github.com/example/repo.git feature-branch", + "description": "Generates a summary like:\n\nThe following changes since commit 1234567... (main):\n\n Some previous commit message\n\nare available in the Git repository at:\n\n https://github.com/example/repo.git feature-branch\n\nfor you to fetch changes up to 89abcde... (feature-branch):\n\n New feature commit message\n Another commit message\n\n----------------------------------------------------------------\n file1.txt | 10 ++++++++++\n file2.js | 5 +++++\n 2 files changed, 15 insertions(+)" + }, { "code": "git request-pull v1.0 https://github.com/example/repo.git v1.1", "description": "Generate a pull request message from v1.0 to v1.1."