# Git Suggestions

### Git Tricks

Here is the list of useful tricks \[[source](https://github.blog/2012-05-02-how-we-use-pull-requests-to-build-github/)]:

* **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&#x20;

Useful resources:

* Conventional Commits \[[Link](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)]
* Conventional Git Commit Messages and Linting \[[Link](https://medium.com/rupesh-tiwari/conventional-git-commit-messages-and-linting-76e1fbb9e14a)]
* AngularJS Git Commit Message Conventions \[[Link](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.uyo6cb12dt6w)]

### 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:

1. **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.
2. **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.
3. **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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ekstremac.com/company/developers/git-suggestions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
