Skip to content

jparadadev/gitbk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

💽 GitBK

GitHub

This Bash script automates the process of backing up or updating your GitHub repositories. It fetches a list of repository names from a specified .bk repository and either clones them (if they're not already present on your local machine) or updates them (if they already exist).

Features

  • Automatic Backup: Clones or updates repositories based on a list fetched from GitHub.
  • Easy to Use: Simply specify your GitHub username and the output directory.
  • Flexible: Uses a central repository to manage the list of repositories you want to back up.

Prerequisites

Before you start using this script, make sure you have git and curl installed on your system. These tools are essential for cloning repositories and fetching the list of repositories from GitHub.

Usage

  1. Clone this Script

First, clone this script to your local machine using the following command:

git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.git
  1. Make the Script Executable

Change the script's permissions to make it executable:

chmod +x backup_github_repos.sh
  1. Execute the Script

Run the script with your GitHub username and optionally specify an output directory where the repositories should be cloned or updated:

./backup_github_repos.sh --user <YourGitHubUsername> [-o <OutputDirectory>]

Replace with your actual GitHub username and with the path where you'd like the repositories to be saved. If you do not specify an output directory, the script will use the current directory by default.

Customization

To customize the list of repositories you want to back up or update, you need to:

  1. Create a .bk repository in your GitHub account.
  2. Add a repos.txt file to the main branch with one repository name per line.

The script will fetch this file and use it to determine which repositories to clone or update.

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

About

💽 Bash script that automates the process of backing up or updating your GitHub repositories.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages