# gitHub

mkdir mypython

第一隻程式:hello.py

```python
# -*- coding: utf-8 -*-
#這是向世界打招呼
print("hello world")
```

### 使用github

#### Step 1: Create a local git repository&#x20;

cd mypython

```
git init
```

#### Step 2: Add a new file to the repo

```
mv ~/hello.py .
git status
```

![](/files/-LwW9eWnMrA5Fqg53zAG)

#### Step 3: Add a file to the staging environment

```
git add .
git status
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

	new file:   hello.py
```

#### Step 4: Create a commit

```
git commit -m "This is my first python!"
*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

```

```
git config --global user.email "kawsing@gmail.com"
git config --global user.name "kawsing"
```

#### Create a new repository on GitHub

![](/files/-LwWAVztz5aH8WoCCLSZ)

#### push an existing repository from the command line

```
git remote add origin https://github.com/kawsing/mypython.git
git push -u origin master
```

![](/files/-LwWAeZvrAd2-GADNn7U)

![](/files/-LwWAj-AsNgzr2Pb1QeU)


---

# 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://kawsing.gitbook.io/opensystem/github.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.
