Cherry-pick multiple commits at one time with no limits!
Before you start, keep in mind:
- Ensure you are running the script inside the target Git repository.
- Verify you have the correct username, permissions, and access tokens.
- Double-check your source and target branch names.
- Have a backup of your repository if necessary.
- Get the Personal Access Token (PAT) from here: https://github.com/settings/tokens
- Make sure you have the
git
andcurl
commands available in your terminal. - This script is designed for GitHub repositories only.
-
Clone the target repository:
git clone <your-target-repository-url> cd <your-target-repository-directory>
-
Download the script using curl & Make the script executable:
curl -O https://raw.githubusercontent.com/ShitijHalder/git-cherry-picking/main/cherry-picking.bash && chmod +x cherry-picking.bash
-
Run the script:
./cherry-picking.bash
-
Follow the prompts: The script will prompt you for the necessary input parameters:
- Source repository URL
- Target repository URL
- Source branch
- Target branch
- Commit list (full hashes, comma-separated)
- Git username
- Git personal access token
-
Wait for the process to complete: This may take a few seconds depending on the number of commits and size of your repository.
-
And Voilà, you're done! Your due cherry-picks are now done, my guy. Let us move on to the next task, shall we?