AvocadoAI-Lab / api_web_frontend

https://api-web-frontend.vercel.app
1 stars 1 forks source link

[Team Alert]: Git Repository Maintenance and Commit Squashing Procedures #13

Open zxzinn opened 1 month ago

zxzinn commented 1 month ago

Reminder: Git Best Practices and Commit Squashing

Dear team,

To maintain a clean and efficient repository, please adhere to these key practices:

  1. Use .gitignore properly: Ensure it includes IDE-specific directories (e.g., .idea/, .vscode/).
  2. Review before committing: Double-check your changes to avoid unintended file uploads.
  3. Squash commits: Before creating a pull request, combine your commits into logical units.

How to Squash Commits Using IntelliJ IDEA:

  1. Open the Git tool window (Alt+9 or Command+9).
  2. Navigate to the Log tab.
  3. Find your local branch in the branches list.
  4. Select the commits you want to squash.
  5. Right-click and choose "Squash Commits".
  6. Edit the commit message as needed and click "OK".
  7. Push your changes to the remote branch.
  8. Create a pull request to merge your changes into the master branch.

Remember, if you've already pushed your commits, you'll need to force push after squashing. Be cautious when doing this on shared branches.

If you need any assistance with these processes, please don't hesitate to ask for help.

Thank you for your cooperation in keeping our repository clean and organized.

Best regards, Xinn

Useful Resources:

YuCheng1122 commented 1 month ago

Thanks