# Tutorial: Github basic

## Terminology

**Repository:**

A **repository** is usually used to organize a single project. Repositories can contain folders and files, images, videos, spreadsheets, and data sets – anything your project needs

**Branch:**

The way to work on different versions of a repository at one time. By default your repository has one branch named `main` which is considered to be the definitive branch. We use branches to experiment and make edits before committing them to `main`.

This diagram shows:

* The `main` branch
* A new branch called `feature` (because we’re doing ‘feature work’ on this branch)
* The journey that `feature` takes before it’s merged into `main`

![a branch](https://guides.github.com/activities/hello-world/branching.png)

Have you ever saved different versions of a file? Something like:

* `story.txt`
* `story-joe-edit.txt`
* `story-joe-edit-reviewed.txt`

Branches accomplish similar goals in GitHub repositories.

**Commit:**

It tells Git that you made some changes which you want to record.

**Pull:**

When you open a *pull request*, you’re proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch

## The GitHub flow

The GitHub flow is a lightweight, branch-based workflow built around core Git commands used by teams around the globe—including ours.

The GitHub flow has six steps, each with distinct benefits when implemented:

1. **Create a branch:** Topic branches created from the canonical deployment branch (usually `main`) allow teams to contribute to many parallel efforts. Short-lived topic branches, in particular, keep teams focused and results in quick ships.
2. **Add commits:** Snapshots of development efforts within a branch create safe, revertible points in the project’s history.
3. **Open a pull request:** Pull requests publicize a project’s ongoing efforts and set the tone for a transparent development process.
4. **Discuss and review code:** Teams participate in code reviews by commenting, testing, and reviewing open pull requests. Code review is at the core of an open and participatory culture.
5. **Merge:** Upon clicking merge, GitHub automatically performs the equivalent of a local ‘git merge’ operation. GitHub also keeps the entire branch development history on the merged pull request.
6. **Deploy:** Teams can choose the best release cycles or incorporate continuous integration tools and operate with the assurance that code on the deployment branch has gone through a robust workflow.

**Learn more about the GitHub flow**

Developers can find more information about the GitHub flow in the resources provided below.

* [Interactive guide](https://guides.github.com/introduction/flow/)
* [GitHub Flow video](https://www.youtube.com/watch?v=47E-jcuQz5c\&index=1\&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4)

## Github Repository Guides

{% embed url="<https://www.youtube.com/watch?v=noZnOSpcjYY>" %}

{% embed url="<https://guides.github.com/activities/hello-world/>" %}

## How to do Version Control with Github

{% embed url="<https://guides.github.com/introduction/git-handbook/>" %}

## Mastering MarkDown

{% embed url="<https://guides.github.com/features/mastering-markdown/>" %}

## Documenting project in repository

{% embed url="<https://guides.github.com/features/wikis/>" %}


---

# 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://ykkim.gitbook.io/dlip/programming/github/github-tutorial.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.
