From 827feb28a25a3ee4e437678c8eb33fbd3b0a511d Mon Sep 17 00:00:00 2001 From: sanjay-kv Date: Thu, 11 Jun 2026 22:22:03 +1000 Subject: [PATCH] added the new doc on branch protection --- .../Maintainer-guide/branch-protection.md | 134 ++++++++++++++++++ .../Maintainer-guide/enable-discussion.md | 2 +- sidebars.ts | 3 +- 3 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 docs/GitHub/Maintainer-guide/branch-protection.md diff --git a/docs/GitHub/Maintainer-guide/branch-protection.md b/docs/GitHub/Maintainer-guide/branch-protection.md new file mode 100644 index 00000000..390faa9c --- /dev/null +++ b/docs/GitHub/Maintainer-guide/branch-protection.md @@ -0,0 +1,134 @@ +--- +id: branch-protection +title: How to Block Merges and Require Reviews on GitHub +sidebar_label: How to do branch protection +sidebar_position: 5 +tags: [GitHub, Git, Open Source, Documentation] +description: In this tutorial, you will learn how to create and initialize a new GitHub repository from scratch using the GitHub web interface. +--- + +In the previous post we spoke about milestones, creating GitHub projects, Create labels, for maintainers. +In order to create a project and host, the repository is a place where you add all your program code files and other documentation. + +### Prerequisites + +- 1. You must have a GitHub account. +- 2. You must also have a basic understanding of how Git works and ensure Git is installed and running on your operating system. + + +### How to create GitHub Repository + +**Step 1:** Go to the GitHub website. By default, you will be on the Home page as shown below. Click on the ``+`` icon in the top-right corner, and from the dropdown, select ``New Repository``. + + + [![GitHub](./assets/21-discussion-github.png)](https://github.com/recodehive/recode-website) + +**Step 2:** Specify the name of the project and choose whether to make it public or private. For this tutorial, we’ll make it public. + +Once a repository is made private, the project admin must manually grant permission to other GitHub users to collaborate or view it. This is a common practice at the organizational level. + +Next, check the box to include a README file—this will automatically create a ``README.md`` file along with the repository. Finally, click on ``Create repository`` at the bottom. + + + + [![GitHub](./assets/22-success-dashboard.png)](https://github.com/recodehive/recode-website/milestones) + + +Once the repository is created, you’ll see a screen like the one below. The explanation of each elements is mentioned below. + + + [![GitHub](./assets/23-github-discussion.png)](https://github.com/recodehive/recode-website/milestones) + + +- **``**: Declares the document type and version of HTML. +- **``**: Root element that contains all other elements. +- **``**: Contains metadata about the document. It includes elements like `` and ``. +- **`<meta charset="UTF-8" />`**: Specifies the character encoding of the document. +- **`<meta name="viewport" content="width=device-width, initial-scale=1.0" />`**: Sets the viewport properties for responsive design. +- **`<title>`**: Sets the title of the document (displayed in the browser tab). +- **`<body>`**: Contains the visible content of the document. +- **`<!-- Your content goes here -->`**: Represents a comment that is not displayed in the browser. + + +## Changing Readme and Adding more files. + +I'm going to add my resume and add my name as heading to the ``README.md`` file + + <BrowserWindow url="https://github.com/recodehive/recode-website/milestones/new" bodyStyle={{padding: 0}}> + [![GitHub](./assets/24-start-github-discussion.png)](https://github.com/recodehive/recode-website/milestones/new) + </BrowserWindow> + +### Adding Markdown Language + +Below is a visual representation of the basic HTML document structure: +```html title="readme.md" +# Git-Demo +This is a demo installation via GUI + +## Developed by Sanjay Viswanathan +This readme contains my resume, please refer to the attached file in the repo. +``` + + +### Browser Rendering + +When the above HTML code is rendered in a browser, it will display the following content: + +<BrowserWindow url="https://github.com/sanjay-kv/Git-Demo/edit/main/README.md"> + <> + <h1>Git-Demo</h1> + <p>This is a demo installation via GUI</p> + + <h1>Developed by Sanjay Viswanathan</h1> + <p>This readme contains my resume, please refer to the attached file in the repo.</p> + + </> +</BrowserWindow> + +### Explanation + +- **`<!DOCTYPE html>`**: Declares the document type and version of HTML. +- **`<html>`**: Root element that contains all other elements. +- **`<head>`**: Contains metadata about the document. +- **`<title>`**: Sets the title of the document (displayed in the browser tab). +- **`<meta>`**: Provides character set and viewport information. +- **`<body>`**: Contains the visible content of the document. +- **`<h1>`**: Heading element with the text "Hello, World!". +- **`<p>`**: Paragraph element with the text "Welcome to HTML learning.". + +## Committing the changes. + +I'm going to add my resume and add my name as heading to the ``README.md`` file + + <BrowserWindow url="https://github.com/recodehive/recode-website/milestones?with_issues=no" bodyStyle={{padding: 0}}> + [![GitHub](./assets/25-start new discussion.png)](https://github.com/recodehive/recode-website/milestones?with_issues=no) + </BrowserWindow> + +This is the step where you need to add additional comments. + + <BrowserWindow url="https://github.com/recodehive/recode-website/milestones?with_issues=no" bodyStyle={{padding: 0}}> + [![GitHub](./assets/26-final-discussion.png)](https://github.com/recodehive/recode-website/milestones?with_issues=no) + </BrowserWindow> + + + +https://github.com/sanjay-kv/Git-Demo + +### Now let's upload your resume + +I'm going to add my resume and add my name as heading to the ``README.md`` file + + <BrowserWindow url="https://github.com/recodehive/recode-website/issues/21" bodyStyle={{padding: 0}}> + [![GitHub](./assets/27-announce-github.png)](https://github.com/recodehive/recode-website/issues/21) + </BrowserWindow> + + + + +Now you will be able to see the uploaded resume. + + +## Conclusion + +In this tutorial, you learned about the syntax and structure of HTML. HTML syntax consists of elements, tags, and attributes that define the structure and content of a web page. +A HTML document follows a basic structure with elements like `<!DOCTYPE html>`, `<html>`, `<head>`, `<title>`, `<meta>`, and `<body>`. Understanding HTML syntax and structure is essential for creating web pages and applications. diff --git a/docs/GitHub/Maintainer-guide/enable-discussion.md b/docs/GitHub/Maintainer-guide/enable-discussion.md index 6408d82c..dde4ad99 100644 --- a/docs/GitHub/Maintainer-guide/enable-discussion.md +++ b/docs/GitHub/Maintainer-guide/enable-discussion.md @@ -1,5 +1,5 @@ --- -id: enable-dicussion +id: enable-discussion title: How to Enable GitHub Discussions sidebar_label: How to Enable Discussions sidebar_position: 4 diff --git a/sidebars.ts b/sidebars.ts index 8cc723a0..d275da13 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -65,7 +65,8 @@ const sidebars: SidebarsConfig = { "GitHub/Maintainer-guide/github-labels", "GitHub/Maintainer-guide/milestone", "GitHub/Maintainer-guide/github-project", - "GitHub/Maintainer-guide/enable-dicussion", + "GitHub/Maintainer-guide/enable-discussion", + "GitHub/Maintainer-guide/branch-protection", ], }, {