Setup Git:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Create a New Repository:
git-basics-assignment
.Clone the Repository:
git clone <https://github.com/your-username/git-basics-assignment.git>
cd git-basics-assignment
Create a Sample Project:
README.md
file.# Git Basics Assignment
This repository is for practicing Git basics including commits, branching, and merging.
Initialize Git and Make Initial Commit:
git init
git add README.md
git commit -m "Initial commit with README"
Push to GitHub:
git remote add origin <https://github.com/your-username/git-basics-assignment.git>
git push -u origin main
Create a New Branch:
feature-1
and switch to it.bashCopy code
git checkout -b feature-1
Make Changes and Commit:
feature.txt
and commit the changes.echo "This is feature 1" > feature.txt
git add feature.txt
git commit -m "Add feature 1"
Push the New Branch to GitHub:
feature-1
branch to GitHub.git push origin feature-1
Create a Pull Request:
feature-1
to main
.Merge the Pull Request:
Update Local Repository:
main
branch and pull the latest changes.git checkout main
git pull origin main
Collaboration: