From 1e83f107da8a3b8f24f22e7858e45f1150dcc377 Mon Sep 17 00:00:00 2001 From: Swastik-Swarup-Dash <143310346+Swastik-Swarup-Dash@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:35:22 +0530 Subject: [PATCH 1/2] fix:Added steps for troubleshooting GitHub Docs tutorials #34764 --- .../contributing-to-a-project.md | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/content/get-started/exploring-projects-on-github/contributing-to-a-project.md b/content/get-started/exploring-projects-on-github/contributing-to-a-project.md index df7832fa45da..a0412925c665 100644 --- a/content/get-started/exploring-projects-on-github/contributing-to-a-project.md +++ b/content/get-started/exploring-projects-on-github/contributing-to-a-project.md @@ -124,6 +124,112 @@ git checkout BRANCH-NAME {% desktop %} +## If any Error +Follow the Steps mentioned below: + +1.Check if your repository has any commits:Run this command in Git Bash: + +{% webui %} + +```shell +git log +``` + +{% endwebui %} + +{% cli %} + +```shell +git log +``` + +{% endcli %} + +{% desktop %} + +2.Check your current branch name: + +{% webui %} + +```shell +git branch +``` + +{% endwebui %} + +{% cli %} + +```shell +git log +``` + +{% endcli %} + +{% desktop %} + +3.If you don't have any commits yet, make an initial commit: + +{% webui %} + +```shell +git add . +git commit -m "Initial commit" +``` + +{% endwebui %} + +{% cli %} + +```shell +git add . +git commit -m "Initial commit" +``` + +{% endcli %} + +{% desktop %} + +4.Now try creating your new branch: + +{% webui %} + +```shell +git checkout -b your-new-branch-name +``` + +{% endwebui %} + +{% cli %} + +```shell +git checkout -b your-new-branch-name +``` + +{% endcli %} + +{% desktop %} + +5.If your default branch is "main" instead of "master", use this command to create a new branch: + +{% webui %} + +```shell +git checkout -b your-new-branch-name main +``` + +{% endwebui %} + +{% cli %} + +```shell +git checkout -b your-new-branch-name main +``` + +{% endcli %} + +{% desktop %} + + For more information about how to create and manage branches in {% data variables.product.prodname_desktop %}, see "[AUTOTITLE](/desktop/making-changes-in-a-branch/managing-branches-in-github-desktop)." {% enddesktop %} From 4d9db864a5bb1edc26f87a67df9738fed714284f Mon Sep 17 00:00:00 2001 From: Swastik-Swarup-Dash <143310346+Swastik-Swarup-Dash@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:50:24 +0530 Subject: [PATCH 2/2] fix:Add steps for troubleshooting GitHub Docs tutorials #34764 --- .../exploring-projects-on-github/contributing-to-a-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/get-started/exploring-projects-on-github/contributing-to-a-project.md b/content/get-started/exploring-projects-on-github/contributing-to-a-project.md index a0412925c665..39e7686e26cf 100644 --- a/content/get-started/exploring-projects-on-github/contributing-to-a-project.md +++ b/content/get-started/exploring-projects-on-github/contributing-to-a-project.md @@ -160,7 +160,7 @@ git branch {% cli %} ```shell -git log +git branch ``` {% endcli %}