While starting a project, you must follow some best practices. It can be naming convention, branching, git-flow, issue tracking, commit message, pull request and so on.

Today I will let you know the most & important one that we overlooked every time we started a project.

Project Naming Convention

Creating a repository requires a project or repository name, and you can enter an optional description of the repository if you want. The description and the repository name make it easier for people to find your project, so if you are working on a chat of an app using React Native, naming it something like “rn-chat-app” and providing a description like “A Chat application in React Native”, would make it easier for other people interested in creating chat app in React Native to find your project.

so you should use
rn-chat-app

Which breaks down into –
rn = React Native [you can use similar for Laravel. Example- laravel-chat-app]
chat = Main Product Name
app = Product Type [Example – app, web, API etc.]

Always use lowercase for project name with separator hyphen (-) only.

Commit Message

For writing commit message. Follow these rules –

  • Add | user profile & photo
  • Update | user profile photo check & filter method
  • Fix | user profile photo duplicate issue
  • Remove | user profile photo

Also, use a description where needed. For major features & updates

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: “Fix bug” and not “Fixed
bug” or “Fixes bug.” This convention matches up with commit messages
generated by commands like git merge and git revert.

Further paragraphs come after blank lines.

  • Bullet points are okay, too.
  • Typically a hyphen or asterisk is used for the bullet, followed by a
    single space. Use a hanging indent.

https://rdevs.xyz
Do you like Ashiqur Rahman's articles? Follow on social!
Comments to: git best practices

Your email address will not be published. Required fields are marked *

Attach images - Only PNG, JPG, JPEG and GIF are supported.

Login

Welcome to rDevs

Brief and amiable onboarding is the first thing a new user sees in the theme.
Join rDevs

start writing