gitvenv


Namegitvenv JSON
Version 1.0.3 PyPI version JSON
download
home_page
SummarySimple tool to create virtual git environments (like a python's venv).
upload_time2024-02-28 05:39:02
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords git venv
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gitvenv

Tool to manage multiple Git environments.

Strongly based on python's venv module.

gitvenv defines four environment variables to make the environment work:
 - `GIT_VIRTUAL_ENV` – a convenience variable pointing to the environment directory.
 - `GIT_CONFIG_GLOBAL` – tells Git to use config from the environment.
 - `GIT_VIRTUAL_ENV_SSH_CONFIG` – a convenience variable pointing to SSH config.
 - `GIT_SSH_COMMAND` – tells Git to use SSH command with config from the environment: `$GIT_SSH -F /path/to/env/ssh_config`. If `GIT_SSH` is undefined, `ssh` will be used instead.

## Installation

### Using pip

```bash
pip install gitvenv
```

### Using AUR

```bash
git clone https://aur.archlinux.org/python-gitvenv.git
cd python-gitvenv/
makepkg -si
```

### Using Git

```bash
git clone https://gitlab.com/yataro/gitvenv.git
cd gitvenv/
pip install .
```


## Usage
```
usage: gitvenv [-h] [--clear] [--copy] ENV_DIR

Creates a virtual Git environment in the target directory.

positional arguments:
  ENV_DIR     A directory to create the environment in.

options:
  -h, --help  show this help message and exit
  --clear     Delete the contents of the environment directory if it already exists, before environment creation.
  --copy      Copy the current config files to the new environment.

Once an environment has been created, you may wish to activate it, e.g. by sourcing an activate script in its bin directory.
```

bash and PowerShell are currently supported:

#### bash

```bash
gitvenv my_env/
source my_env/bin/activate

# Use environment
git config --global user.name 'John Doe'
git config --global user.email 'john@example.com'

# Deactivate environment
gitvenv_deactivate
```

#### PowerShell

```powershell
gitvenv my_env/
.\my_env\bin\Activate.ps1

# Use environment
git config --global user.name 'John Doe'
git config --global user.email 'john@example.com'

# Deactivate environment
gitvenv_deactivate
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "gitvenv",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "git,venv",
    "author": "",
    "author_email": "Aikawa Yataro <me@aikawayataro.com>",
    "download_url": "https://files.pythonhosted.org/packages/be/38/fdb7f286dcc4d04c30d9f7a14a11538808a835a1b1c96bc8c7b6650756f7/gitvenv-1.0.3.tar.gz",
    "platform": null,
    "description": "# gitvenv\n\nTool to manage multiple Git environments.\n\nStrongly based on python's venv module.\n\ngitvenv defines four environment variables to make the environment work:\n - `GIT_VIRTUAL_ENV` \u2013 a convenience variable pointing to the environment directory.\n - `GIT_CONFIG_GLOBAL` \u2013 tells Git to use config from the environment.\n - `GIT_VIRTUAL_ENV_SSH_CONFIG` \u2013 a convenience variable pointing to SSH config.\n - `GIT_SSH_COMMAND` \u2013 tells Git to use SSH command with config from the environment: `$GIT_SSH -F /path/to/env/ssh_config`. If `GIT_SSH` is undefined, `ssh` will be used instead.\n\n## Installation\n\n### Using pip\n\n```bash\npip install gitvenv\n```\n\n### Using AUR\n\n```bash\ngit clone https://aur.archlinux.org/python-gitvenv.git\ncd python-gitvenv/\nmakepkg -si\n```\n\n### Using Git\n\n```bash\ngit clone https://gitlab.com/yataro/gitvenv.git\ncd gitvenv/\npip install .\n```\n\n\n## Usage\n```\nusage: gitvenv [-h] [--clear] [--copy] ENV_DIR\n\nCreates a virtual Git environment in the target directory.\n\npositional arguments:\n  ENV_DIR     A directory to create the environment in.\n\noptions:\n  -h, --help  show this help message and exit\n  --clear     Delete the contents of the environment directory if it already exists, before environment creation.\n  --copy      Copy the current config files to the new environment.\n\nOnce an environment has been created, you may wish to activate it, e.g. by sourcing an activate script in its bin directory.\n```\n\nbash and PowerShell are currently supported:\n\n#### bash\n\n```bash\ngitvenv my_env/\nsource my_env/bin/activate\n\n# Use environment\ngit config --global user.name 'John Doe'\ngit config --global user.email 'john@example.com'\n\n# Deactivate environment\ngitvenv_deactivate\n```\n\n#### PowerShell\n\n```powershell\ngitvenv my_env/\n.\\my_env\\bin\\Activate.ps1\n\n# Use environment\ngit config --global user.name 'John Doe'\ngit config --global user.email 'john@example.com'\n\n# Deactivate environment\ngitvenv_deactivate\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Simple tool to create virtual git environments (like a python's venv).",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://gitlab.com/yataro/gitvenv",
        "Issues": "https://gitlab.com/yataro/gitvenv/-/issues",
        "Repository": "https://gitlab.com/yataro/gitvenv.git"
    },
    "split_keywords": [
        "git",
        "venv"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b36f97657ff739d089c76fa281deeb2052dd9c71932834cebf1a10136c90aa52",
                "md5": "0e16292d491b478a9eb9d24340803f39",
                "sha256": "d85f9e213028c3bda8ae07235d7c11574bec315618ea0c7b000800192ffbc221"
            },
            "downloads": -1,
            "filename": "gitvenv-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0e16292d491b478a9eb9d24340803f39",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6394,
            "upload_time": "2024-02-28T05:39:01",
            "upload_time_iso_8601": "2024-02-28T05:39:01.229321Z",
            "url": "https://files.pythonhosted.org/packages/b3/6f/97657ff739d089c76fa281deeb2052dd9c71932834cebf1a10136c90aa52/gitvenv-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be38fdb7f286dcc4d04c30d9f7a14a11538808a835a1b1c96bc8c7b6650756f7",
                "md5": "f2ae42c9a812e922abc652d2b99fb115",
                "sha256": "b9d43e6438752ffe202a8475b3aaabaaa4555ab9c5101be4f8bbdf4d895e84b2"
            },
            "downloads": -1,
            "filename": "gitvenv-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f2ae42c9a812e922abc652d2b99fb115",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5736,
            "upload_time": "2024-02-28T05:39:02",
            "upload_time_iso_8601": "2024-02-28T05:39:02.225790Z",
            "url": "https://files.pythonhosted.org/packages/be/38/fdb7f286dcc4d04c30d9f7a14a11538808a835a1b1c96bc8c7b6650756f7/gitvenv-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-28 05:39:02",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "yataro",
    "gitlab_project": "gitvenv",
    "lcname": "gitvenv"
}
        
Elapsed time: 1.20023s