# av-git-operation

> Perform the git-operations in NodeJS/Javascript/Typescript.

Latest version **1.1.1** (published 2021-03-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install av-git-operation
pnpm add av-git-operation
yarn add av-git-operation
bun add av-git-operation
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2021-03-26 |
| First published | 2021-03-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Umesh Verma |
| Maintainers | umeshiscreative |
| Keywords | git, nodejs, javascript, git push, git clone, git config, git status, git commit |

## Links

- npm: https://www.npmjs.com/package/av-git-operation
- Repository: https://github.com/umeshiscreative/av-git-operation
- Homepage: https://github.com/umeshiscreative/av-git-operation#readme
- Issues: https://github.com/umeshiscreative/av-git-operation/issues
- npm.io page: https://npm.io/package/av-git-operation

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2021-03-26
- 1.1.0 — 2021-03-26
- 1.0.2 — 2021-03-18
- 1.0.1 — 2021-03-18
- 1.0.0 — 2021-03-18
- 0.1.0 — 2021-03-18

## README

# What is this?

Perform the git-operations in nodeJs.

# Installation

```
npm i av-git-operation --save

OR

yarn add av-git-operation
```

# Usage

- Import the module

```javascript
const gitOperation = require("av-git-operation");
```

- Clone a repo using

```javascript
gitOperation.clone(
  "YOUR HOST REPO URL",
  "FOLDER PATH WHERE YOU WANT TO PUT REPO",
  { checkout: "Your Branch Name" },
  (err) => {
    if (err) {
      throw err;
    }
    console.log("Cloning Done");
  }
);
```

- Config the git user

```javascript
gitOperation.config(
  "FOLDER PATH WHERE YOU PUT REPO",
  { email: configUserEmail, name: configUserName },
  (err) => {
    if (err) {
      throw err;
    }
    console.log("Config Done");
  }
);
```

- Commit the repo

```javascript
gitOperation.commit(
  "FOLDER PATH WHERE YOU PUT REPO",
  { message: commitMessage },
  (err) => {
    if (err) {
      throw err;
    }
    console.log("Commit Done");
  }
);
```

- Push the changes to your repo

```javascript
gitOperation.push(
  "FOLDER PATH WHERE YOU PUT REPO",
  { branch: "Your Branch Name" },
  (err) => {
    if (err) {
      throw err;
    }
    console.log("Push Done");
  }
);
```

- File change status of your repo

```javascript
gitOperation.status("FOLDER PATH WHERE YOU PUT REPO", (result, err) => {
  if (err) {
    throw err;
  }
  console.log(result);
});
```

---

## Options

Use debug to print the useful information.

```javascript
{
  debug: true;
}
```

---

## ❤️ Contributing

This is an open source project, so feel free to contribute. How?

- Open an [issue](https://github.com/umeshiscreative/av-git-operation/issues/new).
- Propose your own fixes, suggestions and open a pull request with the changes.

## Author

Umesh Verma

---
_Source: https://npm.io/package/av-git-operation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
