This repository contains a shell script named gitspread.sh
that spreads commits on a branch to new branches, rebased against main. This script is designed to speed up developer workflow for non-dependent stacked commits, while making PR reviews easier to manage.
Classic stacked branches/commits:
Each successive branch depends on all the previous ones, so it's important to merge these in order. This is best used for incrementally building a single change or related set of changes.
Often times independent changes are added to the same branch for convenience or laziness. With gitspread
you can decide later what is dependent and independent and make new branches based off of main with only those commits.
To install and use this script, follow these steps:
-
Clone the Repository:
Open your terminal and run the following command to clone the repository:
git clone https://github.com/cdelst/git-spread.git
Replace
<repository-url>
with the URL of this repository. -
Navigate to the Directory:
Change into the directory of the cloned repository:
cd gitspread
-
Run the Installation Script (if applicable):
If there is an installation script, run it to set up the environment:
sudo ./install.sh
Ensure the script has executable permissions. You can set it using:
chmod +x install.sh
The script will delete the folder after installation.
To use the script, run the following command:
gitspread
Replace [options]
with any specific options or arguments your script requires.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.