Before heading out on a cruise, create a new branch off master
to track any changes made during the trip.
git checkout master # Switch to the main branch
git pull origin master # Ensure you have the latest changes
git checkout -b cruise-YYYY-MM # Create a new branch (e.g., cruise-2025-03)
git push origin cruise-YYYY-MM # Push the new branch to the remote repo
Work on this branch as needed. After making changes, commit them regularly:
git add .
git commit -m "Description of change"
git push origin cruise-YYYY-MM
Once the cruise is over and everything is tested, merge the branch back into master
.
git checkout master # Switch to master
git pull origin master # Get the latest updates
git merge cruise-YYYY-MM # Merge the cruise branch
git push origin master # Push the updated master branch
If there are merge conflicts, resolve them manually, then continue the merge.
After merging, tag the repository so you can always refer back to this version:
git tag -a vYYYY-MM-cruise -m "Cruise YYYY-MM final version"
git push origin vYYYY-MM-cruise
Example: