# Basic Git Hub skills required!

(TODO move to Engineer's Handbook)

If you have not heard of a **pull request** it is time for you to join over 27 million developers and learn this version control platform. There are lots of cool articles to get you up to speed: [Github Introduction](https://guides.github.com/introduction/flow/) [Forking a Repository in Github](https://help.github.com/articles/fork-a-repo/), [Synicing a Fork in Github](https://help.github.com/articles/syncing-a-fork/)

**We use the Fork and Pull model.** Pro Tip: Keep pull requests small and focused on the issue you are solving. (Large changes in code are much harder to accept)

Basics:

* Fork the repository
* All changes you make must be submitted for review via a pull request to the appropriate branch.
* Ask for clarification if needed (via Git pull requests or Slack).
* Report problems.

## Stay up to date with Git!

To avoid merge conflicts help us out by keeping your fork up to date. Rebase your forked and local repositories from the Greenstand repository before you start coding and before a pull request.

1. Switch to your local master branch.

```
git switch master
```

2. Add the Greenstand repository as a remote and call it upstream.

```
git remote add upstream https://github.com/greenstand/repo.git
```

3. Fetch all branches of the remote repository.

```
git fetch upstream
```

4. Rebase your local master with the upstream master branch.

```
git rebase upstream/master
```

5. Push updates to your forked master.

```
git push origin master
```

6. Switch to your branch then merge the local master to your branch.

```
git switch yourbranch
git merge master
```

8. Resolve merge conflicts and complete merge.
9. Resume coding or create a pull request.


---

# 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.greenstand.org/overview/who-you-are/contributor/githubbasics.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.
