Each bedrock has instructions on how to use it. Just follow the README of the bedrock. You can see the available bedrocks here
-
Create a new git project in your preferred repository management (GitHub, GitLab, BitBucket, etc).
-
Clone your newly created project.
git clone [URL FROM STEP 1]
-
Add the bedrocks you want to use as remotes.
git remote add [REMOTE 1] [BEDROCK URL 1] git remote add [REMOTE 2] [BEDROCK URL 2] # Example: git remote add rest_bedrock https://github.com/blue-harvest-bluedev/java-sb-rest-bedrock.git
-
Verify that the new remotes have been added.
git remote -v
-
For each bedrock you added, fetch and merge changes from its remote.
The first bedrock you merge, shouldn't cause any merge conflict. From the second one, some merge conflicts might occur: on the
customize.sh
andcustomize.cmd
files, you should resolve the conflicts by including the changes from all the bedrocks# Merging [REMOTE 1] git fetch [REMOTE 1] # The changes will be stored in a local branch called [REMOTE 1]/main git merge [REMOTE 1]/main # If there are conflicts, resolve them and merge them: git commit -m "Merged latest changes from [REMOTE 1] bedrock into main" # Merging [REMOTE 2] git fetch [REMOTE 2] # The changes will be stored in a local branch called [REMOTE 2]/main git merge [REMOTE 2]/main # If there are conflicts, resolve them and merge them: git commit -m "Merged latest changes from [REMOTE 2] bedrock into main" # Example: git fetch rest_bedrock # The changes will be stored in a local branch called rest_bedrock/main git merge rest_bedrock/main # If there are conflicts, resolve them and merge them: git commit -m "Merged latest changes from parent into main"
-
Push updates to your own remote.
git push origin main
-
Run the
customize.cmd
or thecustomize.sh
script to finish the rest of the configuration.If you are using windows system run this command:
.\customize.cmd
If you are using unix system run this command:
chmod +x customize.sh && ./customize.sh
-
Commit and push your changes to main.
-
Periodically fetch updated from the remotes and include them in your project
-
Create a new local branch.
git branch feature/bedrocks git checkout feature/bedrocks
-
While on the new branch, delete all the files in your working directory (except .gitignore and/or IDE related files), and commit the changes
git add . git commit -m "Clean up working directory."
-
Follow the guide How to create a new project using the bedrocks excluding steps 1 and 2.
-
Introduce again your source code in the new structure created by the bedrocks.
-
Periodically fetch updated from the remotes and include them in your project
-
Follow the guide How to create a new project using the bedrocks excluding steps 1 and 2. Keep in mind that the script will ask you to provide input values already used for previous bedrocks. It's really important to provide the same values as before.
-
Introduce again your source code in the new structure created by the bedrocks.
-
Periodically fetch updated from the remotes and include them in your project
-
Create a new local branch.
git branch feature/bedrocks-updated git checkout feature/bedrocks-updated
-
Follow the guide How to create a new project using the bedrocks from step 5 until the end. Keep in mind that the script will ask you to provide input values already used for previous bedrocks. It's really important to provide the same values as before.
-
Periodically fetch updated from the remotes and include them in your project