# Git & GitHub - Basics, Branching, Merging, PRs

## Challenge 1: Fork and Clone an Open-Source Project

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741099441736/51617845-9ff7-4da5-a76f-b3b8b6cf67eb.png align="center")

## Challenge 2: Create a New Branch (feature-branch), Switch, and Commit Changes

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741099173447/0d38b9b7-5472-40fc-95d3-069b95ea4dc6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741099235333/cef7ad23-b43d-408d-afef-f9ba97cb3ce4.png align="left")

## Challenge 3: Merge feature-branch into main and Push Changes

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741099351488/9d002ebf-f8b4-40f5-9d11-36a322dc8221.png align="left")

## Challenge 4: Use `git reset` or `git revert` to Undo a Commit

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741099578051/5298eeca-1861-4b99-80e5-8950705dab1d.png align="left")

## Challenge 5: Rebase `feature-branch` onto `main` and Understand the Difference

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741099700641/f8d0dc59-6622-4288-bd36-d7aeaa32021b.png align="left")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741099760900/78ba90c4-d13f-4813-b736-90943f834185.png align="left")

## Challenge 6: Create a PR on GitHub from a Feature Branch

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741101915414/2fcd930a-2d14-4754-89e3-fa17fce8f375.png align="left")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741102056742/19905f8d-9d51-43c2-9639-41d60e55eadc.png align="left")

## Challenge 7: Create Conflicting Changes in Different Branches and Resolve Them

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741100252676/bc3b39a1-ce10-4dd0-bb4b-4ed430fcb48a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741100327711/82e1186c-aaa1-4a5c-98cc-2a53d5b30353.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741100603222/267a1a98-4af8-4264-90b5-2a1408eea0b2.png align="left")

## Challenge 8: Use `git stash` to Save and Restore Uncommitted Changes

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741100697540/23159a02-4663-4f63-a8e9-bf11f0c1b272.png align="left")

## Challenge 9: Add Version Tags to Commits and Push Them

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741100792066/bb5d5240-ecf0-4610-a786-e45fc27b6f62.png align="left")

## Challenge 10: Use `git commit --amend` and `git rebase -i` to Edit Past Commits

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741101001935/baf40d1c-9da2-4410-8877-57acf64dce96.png align="left")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741101078914/8a3bf529-2823-4a9b-8994-c5df6fd94f5c.png align="center")
