This repository serves as an example of a typical workflow using Git and GitHub. Follow the steps below to understand the process:
- Create a new repository on GitHub.
- Create a bash script named
bash.sh
with the provided example script:#!/bin/bash COUNTER=0 while [ $COUNTER -lt 10 ] do echo The counter is $COUNTER let COUNTER=$COUNTER+1 done
- Create a new branch named feature-branch:
git checkout -b feature-branch
- Make changes to the bash.sh script as desired.
- Record the changes in the repository:
git add bash.sh git commit -m "Update bash.sh script" git push origin feature-branch
- Merge the changes from feature-branch into the main branch:
git checkout main
git merge feature-branch
git push origin main
- Create a new branch named develop from main:
git checkout -b develop main
git push origin develop
- Create a new branch named new-feature from develop:
git checkout -b new-feature develop
git push origin new-feature
- Add collaborator to your repository on GitHub.
- Make a Pull Request from new-feature to develop with one reviewer assigned.
- Add one of your classmates as a reviewer.
- Add the link to your repository in the assignment submission.
Happy coding, and may the Git be with you! 😄✨