Skip to main content

This command line tool automates the process of initializing a local Git repository, creating a remote GitHub repository via the GitHub API, optionally adding a .gitignore file, staging changes, committing, and performing the initial push to the remote repository.

Project description

GitHub Repo Automation Tool

This command line tool automates the process of initializing a local Git repository, creating a remote GitHub repository via the GitHub API, optionally adding a .gitignore file, staging changes, committing, and performing the initial push to the remote repository.

Features

  • Initialize a local Git repository.
  • Create a remote repository on GitHub.
  • Optionally add a .gitignore file.
  • Stage changes.
  • Commit changes.
  • Push the initial commit to the remote repository.

Requirements

  • Python 3.x
  • Git
  • GitHub account and authorization token

Installation

Usage

python create-remote-repo -rn <repo-name> -gu <github-username> -t <github-token> -d <working-directory> [-i <include-gitignore>] [-p <private>]

Example

python create-remote-repo -rn my-new-repo -gu myusername -t mytoken -d /path/to/working/directory -i y -p y

This command will:

  1. Initialize a Git repository in the specified local working directory.
  2. Create a remote repository named my-new-repo under the GitHub account myusername.
  3. Add a .gitignore file to the repository.
  4. Stage all changes.
  5. Commit the changes.
  6. Push the initial commit to the private remote repository.

CLI Arguments

Argument Description Required Default Value
-rn, --repo-name The name of the remote repository you want to create. Yes None
-gu, --github-username The username of your GitHub account. No global_github_username
-t, --github-token Your GitHub authorization token. No global_github_token
-d, --working-directory The absolute path to the local working directory where the repository should be initialized. Yes None
-i, --include-gitignore Enter y if you want to add a .gitignore file to your repository, otherwise enter n. No n
-p, --private Enter y if you want to make the remote repository private, otherwise enter n. No n

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Created and maintained by Kim Chung.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

create-remote-repo-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

create_remote_repo-1.0.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file create-remote-repo-1.0.0.tar.gz.

File metadata

  • Download URL: create-remote-repo-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for create-remote-repo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a6e192030e1cf324a142f2896f1377faae96993376f0998142b6e823d55c3839
MD5 e6e506ea8ee294b8e3004dd6281b6913
BLAKE2b-256 e42a32a9a01dc69b896d7af9de7afe2e9ddc446b0ed28295cce83ab9399edf37

See more details on using hashes here.

File details

Details for the file create_remote_repo-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for create_remote_repo-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f94b75db58e19acafaa088fc949476704485ad2c3b1f73a5ad80e3f3c9c8eccf
MD5 86124b1b77756b58220cd28bdde7b3b3
BLAKE2b-256 dfde64cc4f74a8ad477d556ba1195664aa46b4294344d652764e367aa91539b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page