Git Suggestions
Some tricks to make Merge Requests more awesome for your project.
Git Tricks
Here is the list of useful tricks [source]:
Open a Merge Request as early as possible Merge Requests are a great way to start a conversation of a feature, so start one as soon as possible - even before you are finished with the code. Your team can comment on the feature as it evolves, instead of providing all their feedback at the very end.
Merge Requests work branch to branch No one has a fork of gitlab/gitlab. We make Merge Requests in the same repository by opening Merge Requests for branches.
A Merge Request doesnβt have to be merged Merge Requests are easy to make and a great way to get feedback and track progress on a branch. But some ideas donβt make it. Itβs okay to close a Merge Request without merging; we do it all the time.
Git Message Convention
Useful resources:
Conventional Commits [Link]
Conventional Git Commit Messages and Linting [Link]
AngularJS Git Commit Message Conventions [Link]
Pull Request Update
When updating a pull request, it is important to avoid closing the previous pull request and opening a new one.
Updating the existing pull request instead of creating a new one is crucial for several reasons:
Consistent History: By updating the existing pull request, the version control history remains intact and maintains a clear and coherent record of changes. It allows team members to easily track the progression of the code review process and refer back to previous comments, discussions, and iterations.
Efficient Collaboration: Keeping the original pull request open facilitates effective collaboration and avoids fragmentation of feedback and discussions. All comments, suggestions, and code review discussions are preserved within the context of the initial pull request, allowing for a comprehensive overview of the changes and their corresponding evaluations.
Streamlined Workflow: Updating the pull request on the original branch streamlines the development workflow. It eliminates the need to manage multiple branches, reducing complexity and potential confusion for both the author and reviewers. It ensures that the updates are applied directly to the existing branch, avoiding unnecessary branching and merging operations.
In summary, maintaining the integrity of the pull request by updating it on the original branch enhances transparency, collaboration, and efficiency throughout the code review process.
Last updated