Skip to content

This How-To Guide provides a comprehensive overview for effectively collaborating on GitHub by utilizing Projects and Issues, as well as setting up essential Visual Studio Code (VSCode) extensions.

Notifications You must be signed in to change notification settings

perceptronbd/how-to-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

how-to-guide

GitHub Collaboration Guidelines

Types of Prefixes

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation-only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation

1. Repository Setup

Clone the repository: Obtain the repository by executing the following command in your terminal:

git clone [repository-url]

2. Issue Assignment

Review the issues, project board, or issue tracker (Jira) to identify the issue assigned to you.

3. Branch Creation

Create a new branch for the issue you'll be working on, following the branch naming convention: [type]/[issue_title]
Example: If your assigned issue title is Login Feature for Admin, create a branch named feat/admin
Here is a step-by-step example:

  1. View the issue and click on “Create a branch” under the Development section. Screenshot 2024-07-29 172356
  2. Change the branch name to [type]/[issue_title] in this case, feat/login since the issue number is about the "login feature for the user". Screenshot 2024-07-29 172740
  3. Click on “change branch source” and select the required branch, in this case, "development”, and click “Create branch”. (Make sure to check the local checkout option.)Screenshot 2024-07-29 172934
  4. And finally, run these commands in your local repo.
    git fetch origin
    git checkout feat/login
    

5. Write Clear and Concise Commit Messages

  • Subject Line: Use a short, descriptive subject line (50 characters or less) that summarizes the change.
  • Body: If necessary, add a more detailed explanation of what was changed and why. This is optional for small changes but recommended for complex changes.
  • Imperative Mood: Write in the imperative mood. E.g., “Fix bug” rather than “Fixed bug”.
  • And then push the changes to remote repo: git push origin [type]-[issue-title]

6. Follow a Consistent Format

Here is a commonly used format:

  • Type: The type of change being made (e.g., feat, fix, docs, style, refactor, test, chore).
  • Scope: The area of the codebase the change affects (optional but helpful).
  • Subject: A brief summary of the change.
  • Body: A more detailed description of the change, if necessary. Example:
feat(auth): add OAuth2 login support

Added OAuth2 login support to enable users to log in with   third-party services. 
- Integrated Google and Facebook login options 
- Updated the authentication service to handle OAuth2 tokens 
- Modified the login page to include new buttons

This change improves user experience by providing more login options.

7. Pull Request Submission

  1. Once your changes are complete and pushed to your branch, create a pull request (PR) to merge your branch into the main branch (or the designated target branch).
  2. Provide a detailed description of the changes made, referencing the issue name in the PR title and the issue number in the description. Here is an example:
  • Here the Issue name/title is a quiz and the number is #6 image
  • The PR should look like this: Here provide the title of the issue in the title of the PR and in the description use keywords such as close closes closed,fix fixes fixed or resolve resolves resolved image
  • Add more details in the issue description if necessary.

VSCode Extension Setup

Setup Workspace

  • Create a .vscode in your workspace/root directory of the file you are working on.
  • Create a settings.json and paste this setting
    {
    "todo-tree.general.showActivityBarBadge": true,
     "todo-tree.general.tags": [
     	"NOTE",
     	"TODO",
     	"FIX",
     	"MARK",
     	"BUG",
     	"DOC",
     	"[ ]",
     	"[x]"
     ],
     "todo-tree.general.showIconsInsteadOfTagsInStatusBar": true,
     "todo-tree.general.statusBar": "tags",
     "todo-tree.highlights.defaultHighlight": {
     	"type": "tag",
     	"fontWeight": "bold",
     	"foreground": "#d8d8d8",
     	"opacity": 90
     },
     "todo-tree.highlights.customHighlight": {
     	"TODO": {
     		"icon": "checkbox",
     		"type": "line",
     		"background": "#65B741",
     		"iconColour": "#65B741",
     		"gutterIcon": true,
     		"opacity": 0.5
     	},
     	"FIX": {
     		"icon": "alert",
     		"type": "line",
     		"background": "#ffbb00",
     		"iconColour": "#ffbb00",
     		"gutterIcon": true,
     		"opacity": 0.3
     	},
     	"DOC": {
     		"icon": "book",
     		"type": "line",
     		"background": "#c8f1ff",
     		"iconColour": "#c8f1ff",
     		"gutterIcon": true,
     		"opacity": 0.3
     	},
     	"NOTE": {
     		"icon": "note",
     		"type": "line",
     		"background": "#00BFFF",
     		"iconColour": "#00BFFF",
     		"gutterIcon": true,
     		"opacity": 0.3
     	},
     	"MARK": {
     		"background": "#157EFB",
     		"iconColour": "#157EFB",
     		"gutterIcon": true,
     		"opacity": 0.3,
     		"type": "line",
     		"icon": "tag"
     	},
     	"BUG": {
     		"icon": "bug",
     		"type": "line",
     		"background": "#FE0000",
     		"iconColour": "#FE0000",
     		"gutterIcon": true,
     		"opacity": 0.3
     	},
     	"[ ]": {
     		"icon": "issue-draft"
     	},
     	"[x]": {
     		"icon": "issue-closed"
     	}
       }
    }
    look into the repository for the setup.

Install the Extensions

Install these two extensions:
image

  • Todo Tree extension will highlight the notes, docs, bugs, marks, etc.

How to use Todo Tree

Just start the comment with NOTE:, DOC:, FIX: etc to highlight the code or comment. image
On the sidebar of the VSCode, open the extension to view the lists of the highlighted notes
image

Happy Hacking!

About

This How-To Guide provides a comprehensive overview for effectively collaborating on GitHub by utilizing Projects and Issues, as well as setting up essential Visual Studio Code (VSCode) extensions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published