1.1.5 • Published 3 years ago

@pwuersch/git-cli v1.1.5

Weekly downloads
24
License
MIT
Repository
gitlab
Last release
3 years ago

Git-CLI

This cli provides easy to use commands for creating git repos, managing credentials and committing changes. It is installable via a node package manager. It uses a configuration file which gets saved to your home folder. To use this tool there are some example usages documented in the usages section.

GItLab / GitHub API's

The cli is capable of using GItLab and GItHub RestAPI's. This will be automatically activated if you have an access key and host defined in the profile you are using in a compatible action (e.g. gt c and gt n). The configuration dialogue will also take you through all steps needed if you want to configure an API provider for your profile.

Commands

Here is a list of every available command:

gt new      # Creting a new git repo remotely and clone + configure it locally
gt clone    # Cloning an existing git repo
gt config   # Apply a profile's settings to the current git repo
gt generate # Generate git-lfs or .gitignore files for your current repo
gt update   # Update all .gitignore templates in the local cache
gt setting  # Configure profiles with git credentials, api tokens and GPG keys
c           # Commit all changes in a repo with a specified message and push to remote

New git repo (gt n)

Aliases: gt new

This command is only available for use in combination with a api enabled profile. It will create a new repository on the target server and clone it to a local folder. In addition it will configure the cloned repo with the required settings and provide an option to enable git-lfs (with a template) and generate a .gitignore file.

Optional parameters:

-f <string> # Target folder for cloning the remote repository
-p <string> # Profile name or alias to use for creating and configuring the repo

Clone remote repo (gt c)

Aliases: gt clone

This command clones an existing git repository. It can be used in combination with a configured API provider. If a url is specified via the -u parameter the API capabilities of the selected profile will be ignored.

-u <string> # SSH url to the existing git repo
-f <string> # Target folder for the cloned repo
-p <string> # Profile name or alias to use for configuring the cloned repo

Generate gitignore / Configure git-lfs (gt g)

Aliases: gt generate

This command is currently able to do two different things. Creating a .gitignore file in the current directory and configuring git-lfs in the current repo in combination with a default .gitattributes template. Per invocation only one thing can be done. There are no parameters available for this command since those actions are mainly done via the interactive command line context.

Update gitignore template cache (gt u)

Aliases gt update

Every time you are using a gitignore template the template will be stored in a local cache to remain useable offline. To 'prepare' even more for offline use you can also update all templates manually with this command.

Configure cli profiles (gt s)

Aliases gt setting, gt settings

For managing your profiles there are 3 sub-commands available.

gt s add # Add a new profile
gt s ls  # List configured profiles
gt s rm  # Remove a profile

Commit changes (c)

Aliases gt commit

The easiest way to commit all local changes and pushing them onto the remote branch.

c # No additional text will trigger the interactive message dialogue
c This is my commit message
1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.9.12

4 years ago

0.9.9

4 years ago

0.9.10

4 years ago

0.9.11

4 years ago

0.9.8

4 years ago

0.9.7

4 years ago

0.9.6

4 years ago

0.9.5

4 years ago

0.9.3

4 years ago

0.9.0

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.8.4

4 years ago

0.8.3

4 years ago

0.8.2

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago