# First Checkout with Git

If git is new to you, there are lots of [good write-ups](https://blog.scottlowe.org/2015/01/27/using-fork-branch-git-workflow/) on the topic.  I won't rehash all the detail from other places, but assuming you have git installed and have already forked AndHow, here is the quick version of getting a local copy ready for development (from a mac/linux terminal window, enter the commands following the <mark style="color:orange;">**`>`**</mark> prompt:

```bash
> git clone https://github.com/[your user name]/andhow.git

Cloning into 'andhow'...
remote: Counting objects: 10545, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 10545 (delta 19), reused 60 (delta 7), pack-reused 10445
Receiving objects: 100% (10545/10545), 13.

> cd andhow
> git remote add upstream https://github.com/eeverman/andhow.git
> git checkout main
```

* Line 1:  *Clones* (i.e. copies the entire project) your fork of AndHow to your local machine, into a directory named andhow in the directory you are currently in
* Line 9:  cd into that directory
* Line 10:  By forking, you have your own remote repository of AndHow on GitHub.  When you cloned it, it was copied to your local machine, but it knows about that remote copy and calls it 'origin'.  Line 10 tells your local copy about another remote repository that you are calling 'upstream'.   You need upstream in order to pull in the latest changes to your local copy.
* Line 11:  Switch to the main branch (you would have been on the default homepage branch previously)

To begin working on, for example, Issue 123 "Long titles are too long and very wordy", create a new branch for it :

```bash
> git checkout -b Issue123-Long-titles
```

Later you will commit, push, and put in a pull request, but I'll leave those details to [other references](https://blog.scottlowe.org/2015/01/27/using-fork-branch-git-workflow/).


---

# 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://www.andhowconfig.org/developer-guide/first-checkout-with-git.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.
