Skip to content

BunkerSync simplifies Git repository syncing. Sync internal and external repositories with branch filtering and automatic syncing. Ideal for developers who need to keep repositories in sync.

License

Notifications You must be signed in to change notification settings

okashaluai/BunkerSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BunkerSync

                      *-+-+-+-+-+-+-+-+-+-+-+*                  +++++++++++++++++            
                      |         .--.         |                  +               +          
                      |        / {} \        |                  +    External   +          
                      |_______/  /\  \_______|----------------+ +   REPOSITORY  +
                      |#######| |  | |#######|                  +               +
                      |#######`-'++'-´#######|                  +++++++++++++++++
                      *-+-+-+BunkerSync+-+-+-*
                                |
                                |
                                |
                                |
                                +   
                         +++++++++++++++++
                         +               +
                         +    Internal   +
                         +   REPOSITORY  +
                         +               +
                         +++++++++++++++++

BunkerSync is a Python script that simplifies the process of syncing Git repositories. With BunkerSync, you can easily sync an internal repository with an external one and sync new branches from the external repository to the internal repository with support for filtering. BunkerSync is customizable and easy to use, making it an ideal tool for developers who need to keep their repositories in sync.

Use cases [to update after finishing the generalization stage]

  1. Publish an internal branch into external branch with option to filter.
  2. Fetch external branches whose names startes with given prefix into internal branch.
  3. Fetch a specific external branch into internal branch.

Prerequisites [to update after finishing the generalization stage]

  1. Python >= 3.11 [to update after finishing the generalization stage]
  2. installed git
  3. Tested on Unix/Win OS with BitBacket and Gitlab git repositories.

Getting Started [to update after finishing the generalization stage]

  1. Use Case 1:

    BunkerSync -p -i=<internal_repo_url> -e=<external_repo_url> -ib=<internal_name_for_fetched_branch> -eb=<external_branch_to_fetch> -bb=<base_of_internal_fetched_branch> -fm=<path_of_filter_map>

  2. Use Case 2:

    BunkerSync -f -i=<internal_repo_url> -e=<external_repo_url> -@= -bb=<internal_base_of_fetched_branch>

  3. Use Case 3:

    BunkerSync -f -i=<internal_repo_url> -e=<external_repo_url> -eb=<external_branch_to_fetch> -ib=<internal_name_for_fetched_branch> -bb=<base_of_internal_fetched_branch>

  • -bb is optional, default base would be 'master' branch, could be found in config.py file.
  • -fm is optional, otherwise no filtering would be executed.
  • In case you are not sure if you understood the args, see CLI Args below.

Command-line Arguments [to update after finishing the generalization stage]

-p,      --publish         Option to publish a given branch from internal repository to external repository.
-f,       --fetch         Option to fetch all new branches with a given prefix from external repository to the internal repository.
-i,       --internal         Internal repository url.
-e,      --external        External repository url.
-@,     --prefix         (Required when -f is on) Prefix of external branches to be pulled to internal repository.
-fm,     --filter_map      Path of the filtering map that includes files or folders names to be filtered.
-ib,     --internal_branch      (Required when -f is on)The name of the branch in the internal repository.
-eb,     --external_branch      (Required when -f is on) The name of the branch in the external repository.
-bb,     --branch_base      The base branch name to be the base of the new fetched branch.

Notes

  1. Be aware that the tool may ask for authentication credentials with git, the authentication is processed directly against git.
  2. The merge is processed in overwrite manner.
  3. BunkerSync uses the /tmp directory for sync pool mid-operations.

Contributing

If you have any issues or suggestions for BunkerSync, feel free to open an issue or submit a pull request on the GitHub repository.

License

BunkerSync is released under the Apache License. See the LICENSE file for details.

About

BunkerSync simplifies Git repository syncing. Sync internal and external repositories with branch filtering and automatic syncing. Ideal for developers who need to keep repositories in sync.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages