└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # full-stack-assignment-2-git 2 | 3 | ## Git Branching, Merging, and Issue Handling Assignment 4 | 5 | ### Instructions: 6 | 7 | #### Part 1: Initial Setup 8 | 9 | 1. **Fork this Repository:** 10 | 11 | 2. **Clone the Repository:** 12 | - Clone the forked repository to your local machine. 13 | 14 | #### Part 2: Create a Feature Branch 15 | 16 | 3. **Create a New Branch:** 17 | - Create and switch to a new branch named `feature/added-learnings`. 18 | 19 | 4. **Create and Update a Readme:** 20 | - Create the `learnings.md` file and add a section titled "5 Things I have learned about Git and GitHub" with a brief description. 21 | 22 | 5. **Commit the Changes:** 23 | - Add, commit, and push your changes to the remote repository. 24 | ```bash 25 | git add learnings.md 26 | git commit -m "Add Project Overview section to learnings.md" 27 | git push origin feature/added-learnings 28 | ``` 29 | 30 | #### Part 3: Create an Issue and Add few more features 31 | 32 | 6. **Create an Issue:** 33 | - On GitHub, create an issue titled "2 more things I have learnt". 34 | 35 | 7. **Create another feature Branch:** 36 | - Create and switch to a new branch named `feature/new-learnings`. 37 | 38 | 8. **Add the new features:** 39 | - In the ` learnings.md` file, add 2 more of your learnings. 40 | 41 | 9. **Commit the feature branch:** 42 | - Add, commit, and push your changes to the remote repository. 43 | ```bash 44 | git add learnings.md 45 | git commit -m "added 2 more features in README" 46 | git push origin feature/new-learnings 47 | ``` 48 | 49 | 10. **Close the Issue:** 50 | - Go to GitHub and close the issue "2 more things I have learnt". 51 | 52 | #### Part 4: Merge Branches 53 | 54 | 11. **Merge the Feature Branch:** 55 | - Switch to the `main` branch and merge the `feature/added-learnings` branch. 56 | ```bash 57 | git checkout main 58 | git pull origin main 59 | git merge feature/added-learnings 60 | ``` 61 | 62 | 12. **Merge the new feature Branch:** 63 | - Merge the `feature/new-learnings` branch into the `main` branch. If there are any conflicts, resolve them. 64 | ```bash 65 | git merge feature/new-learnings 66 | ``` 67 | 68 | If there are conflicts: 69 | - Open the conflicting files and resolve the conflicts manually. 70 | - Mark the conflicts as resolved by adding the resolved files. 71 | ```bash 72 | git add README.md 73 | git commit -m "Resolve merge conflicts" 74 | ``` 75 | 76 | 13. **Push the Merged Changes:** 77 | - Push the merged changes to the remote repository. 78 | ```bash 79 | git push origin main 80 | ``` 81 | --------------------------------------------------------------------------------