#git-repository #git #management #version-control #command-line #cli

app gitmgt

An easy way to create your git repository without leaving your project

2 releases

0.1.2 Jan 9, 2022
0.1.1 Jul 17, 2021
0.1.0 Jun 3, 2021

#2246 in Development tools

Apache-2.0

34KB
695 lines

GitHub contributors GitHub issues License Build

Git Management CLI

About The Project

Have you ever wondered how nice it would be if you could code your project and when you think it is time to publish it on a version control host like GitHub you could just type a command line and it sets up your repository? That is what Git Management CLI, gitmgt, gives to you. Now you do not need to leave your project's environment to manually create you repository on GitHub, you just need to type gitmgt create -n awesome_repo and then push your project.

Built With

Getting Started

Prerequisites

To install gitmgt it is necessary that your machine has the following prerequisites:

  • Rust
  • Cargo

Installation

Cargo

The easiest, and recommended way to install gitmgt is to download directly by crates.io typing cargo install gitmgt in a terminal.

Once it is finished, the tool is ready to be used and you can type gitmgt --version just to check.

Build from source

Other option is to download the code from this repository and build it manualy by typing cargo build --release in a terminal and when cargo process finishes just move the binary file from target/release/ directory to where you think is better and add the binary path to the $PATH.

Once it is finished the the tool is ready to use and you can type gitmgt --version just to check.

After the installation process finishes, to start using gitmgt cli the user will have to insert the Github credentials to have access to all the set tools. The user just needs to create a new personal access token in Github portal and then just type in a terminal

gitmgt config -u github_username -t personal_access_token

After this all the commands are ready to be used.

Usage

Update Github credentials

gitmgt github_config -u github_username -t github_token

Github Repository creation

gitmgt create -n awesome_repository_name

since Github is the most common version control service, it is the default option and its indication can be suppressed.

gitmgt github create -n awesome_repository_name

Org's repository creation

gitmgt github create -o orr_name -n awesome_repository_name

Private repository creation

gitmgt github create -n awesome_repository_name -p

Auto init repository creation

gitmgt github create -n awesome_repository_name -i

Repository deletion

gitmgt delete -n awesome_repository_name

Org's repository deletion

gitmgt delete -o org_name -n awesome_repository_name

Repository archiving

gitmgt archive -n awesome_repository_name

Org's repository archiving

gitmgt archive -o org_name -n awesome_repository_name

Repository's description update

gitmgt update -n awesome_repository_name -d "update awesome description od the repo"

Repository's visibility update public to private

gitmgt update -n awesome_repository_name -i

Repository's visibility update private to public

gitmgt update -n awesome_repository_name

Create Pull Request

gitmgt github pullrequest -n awesome_repository_name -H head_branch -B base_branch -T "Title of the Pull Request" -b "Body message of the Pull Request"

List Pull Request

gitmgt github listpr -n awesome_repository_name [-s all|open|close]

Merge Pull Request

gitmgt github merge -n awesome_repository_name -N pullrequest_number -M merge_method merge|squash|rebase

Looking for help

gitmgt --help

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Copyright 2021 João Pedro Poloni Ponce

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependencies

~5–17MB
~240K SLoC