# Using Git Commands

SimplifyQA Code Editor provides built-in scripts to help you compile your custom code and push it to your Git repository for use in test automation.

### Publishing Custom Jar to Git/BitBucket

After writing and building your custom method, you can publish it directly to your **Git repository** by using the `publish.bat` command.

#### Example: Publishing the code to GitLab

* Open the terminal in your **Code Editor** project directory
* One-Time Setup-
  * Once the custom methods are written and are error free, run the command:

    ```
    publish.bat
    ```

  * A **one-time pop-up** will appear prompting you to log in:
    * Git URL: Your GitLab repository URL will bce auto-populated
    * Username: Your GitLab username
    * Token: Your GitLab Personal Access Token
* After successful authentication, **run the command again**:&#x20;

  ```
  publish.bat
  ```
* This will publish the custom jar to your GitLab repository and automatically generate a new tag.\
  You can verify it by visiting your GitLab project and navigating to:\
  `Repository → Tags`\
  This tag contains your updated `[Project_Name].jar` with the custom method, allowing version tracking and easy reuse.

### Other Commands (Windows)

* **`build.bat`**:\
  Use this command before publishing to compile your code and generate the JAR file containing the new custom methods.
* **`push.bat`** *(optional)*:\
  If you want to only push your code (without publishing), use this command after building.
* `sync.bat`:\
  Use this command after building the jar to sync the actions directly into the tool.

### Mac Equivalent Commands

* **`./macBuild.sh`** – for compiling the code (like `build.bat`)
* **`./macPublish.sh`** – for publishing the compiled code to Git (like `publish.bat`)
* `./macSync.sh`: for syncing the actions directly into the tool (like `sync.bat`)

{% hint style="info" %}
In addition to these specific commands, users can also utilize standard Git commands such as `clone`, `push`, and `pull`, as well as common Maven commands as needed.
{% endhint %}


---

# 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://docs.simplifyqa.ai/code-editor/using-git-commands.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.
