# Git Workflow

Here's the general Git workflow that you will run into:

1. Pull from origin main/master: `git pull origin main`
2. Create your own development branch: `git checkout -b <your branch name>`
3. Make your edits
4. Commit and push your changes to your branch:

```
git add <file changed> <file changed>
git commit -m "commit message"
git push --set-upstream origin <your branch name>
```

5. Open a pull request (PR) in the GitHub interface to merge into main:

Remember to **never commit and push directly to main**. The purpose of git is to create a way for many people to work on the same code at the same time without major conflicts.

We also would like to see a clean git history. This means:

* Rebase often: try to pull the latest changes from main as needed
* Make PRs for features and try not to run into conflicts
* Make commits linear if possible: ![](/files/7KPfzNClKmO9DOVLFdZP)

As a first assignment, please complete [Git Practice Assignment](/techops/getting-started-projects/getting-started-with-techops-projects/git-practice-assignment.md)


---

# 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://wiki.berkie.ee/techops/getting-started-projects/getting-started-with-techops-projects/git-workflow.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.
