Skip to content

Commit

Permalink
chore: update readme add branch info doces
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jun 29, 2022
1 parent 691f8a4 commit 3c08adf
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,37 @@ You can quickly get a git repository information at local.
repo := gitw.NewRepo("/path/to/my-repo")
```

**Remote Information**:
### Branch Information

```go
brInfo := repo.CurBranchInfo()

dump.Println(brInfo)
```

**Output**:

![one-remote-info](_examples/images/one-branch-info.png)

### Remote Information

```go
rt := repo.DefaultRemoteInfo()

dump.Println(rt)
```

Output:
**Output**:

![one-remote-info](_examples/images/one-remote-info.png)

**Repo Information**:
### Repo Information

```go
dump.Println(repo.Info())
```

Output:
**Output**:

![simple-repo-info](_examples/images/simple-repo-info.png)

Expand Down
18 changes: 15 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,27 @@ func main() {
repo := gitw.NewRepo("/path/to/my-repo")
```

**Remote 信息**:
### Branch 信息

```go
brInfo := repo.CurBranchInfo()

dump.Println(brInfo)
```

**Output**:

![one-remote-info](_examples/images/one-branch-info.png)

### Remote 信息

```go
rt := repo.DefaultRemoteInfo()

dump.Println(rt)
```

Output:
**Output**:

![one-remote-info](_examples/images/one-remote-info.png)

Expand All @@ -107,7 +119,7 @@ Output:
dump.Println(repo.Info())
```

Output:
**Output**:

![simple-repo-info](_examples/images/simple-repo-info.png)

Expand Down
Binary file added _examples/images/one-branch-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3c08adf

Please sign in to comment.