From 24ef8c24a2ec1a808e0fd96ce44479a5b7ccdd51 Mon Sep 17 00:00:00 2001
From: Jens Scheffler <jens.scheffler@de.bosch.com>
Date: Tue, 17 Dec 2024 20:33:16 +0100
Subject: [PATCH 1/2] Fix pre-commit doc URL

---
 scripts/ci/pre_commit/new_session_in_provide_session.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/ci/pre_commit/new_session_in_provide_session.py b/scripts/ci/pre_commit/new_session_in_provide_session.py
index b6ba24cccff0f..badef0944897b 100755
--- a/scripts/ci/pre_commit/new_session_in_provide_session.py
+++ b/scripts/ci/pre_commit/new_session_in_provide_session.py
@@ -119,7 +119,7 @@ def main(argv: list[str]) -> int:
         print("Only function decorated with @provide_session should use 'session: Session = NEW_SESSION'.")
         print(
             "See: https://github.com/apache/airflow/blob/main/"
-            "contributing-docs/creating_issues_and_pull_requests#database-session-handling"
+            "contributing-docs/05_pull_requests.rst#database-session-handling"
         )
     return len(errors)
 

From d2efa01ec7b927a67f42185753f03b79f6acf149 Mon Sep 17 00:00:00 2001
From: Jens Scheffler <jens.scheffler@de.bosch.com>
Date: Tue, 17 Dec 2024 20:41:57 +0100
Subject: [PATCH 2/2] Fix other broken URLs to GIT in docs

---
 dev/breeze/src/airflow_breeze/commands/ci_image_commands.py | 2 +-
 docs/docker-stack/README.md                                 | 2 +-
 docs/docker-stack/index.rst                                 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py b/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
index 3c49e530fcec2..9ab3250fc2cb8 100644
--- a/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
@@ -730,7 +730,7 @@ def should_we_run_the_build(build_ci_params: BuildCiParams) -> bool:
                     get_console().print(
                         f"[info]Please rebase your code to latest {build_ci_params.airflow_branch} "
                         "before continuing.[/]\nCheck this link to find out how "
-                        "https://github.com/apache/airflow/blob/main/contributing-docs/11_working_with_git.rst\n"
+                        "https://github.com/apache/airflow/blob/main/contributing-docs/10_working_with_git.rst\n"
                     )
                     get_console().print("[error]Exiting the process[/]\n")
                     sys.exit(1)
diff --git a/docs/docker-stack/README.md b/docs/docker-stack/README.md
index c3e798c264de2..f787016de7041 100644
--- a/docs/docker-stack/README.md
+++ b/docs/docker-stack/README.md
@@ -63,7 +63,7 @@ packages or even custom providers. You can learn how to do it in [Building the i
 
 The production images are build in DockerHub from released version and release candidates. There
 are also images published from branches but they are used mainly for development and testing purpose.
-See [Airflow Git Branching](https://github.com/apache/airflow/blob/main/contributing-docs/working-with-git#airflow-git-branches)
+See [Airflow Git Branching](https://github.com/apache/airflow/blob/main/contributing-docs/10_working_with_git.rst#airflow-git-branches)
 for details.
 
 ## Usage
diff --git a/docs/docker-stack/index.rst b/docs/docker-stack/index.rst
index b579d2e8c23e5..d540eddf6220c 100644
--- a/docs/docker-stack/index.rst
+++ b/docs/docker-stack/index.rst
@@ -80,7 +80,7 @@ packages or even custom providers. You can learn how to do it in :ref:`Building
 
 The production images are build in DockerHub from released version and release candidates. There
 are also images published from branches but they are used mainly for development and testing purpose.
-See `Airflow Git Branching <https://github.com/apache/airflow/blob/main/contributing-docs/working-with-git#airflow-git-branches>`_
+See `Airflow Git Branching <https://github.com/apache/airflow/blob/main/contributing-docs/10_working_with_git.rst#airflow-git-branches>`_
 for details.
 
 Fixing images at release time
