Goal: Create a simple webpage with separate HTML, CSS and JS files and combine them using both merge and rebase operations as mentioned.
-
Fork this Repository
I think you all know how to do this.
-
Clone Your Fork
Clone your fork to your local machine.
-
Create Your HTML Branch
Now, let's start building! Create and switch to a new branch for your HTML file. Be sure to include your roll number in the branch name. Then, create a file named
index.htmlinside your project folder and add some simple HTML code. -
Commit Your HTML
Stage the
index.htmlfile, commit it with a message that includes your roll number like, "LCS20250AB: {commit message}". -
Create Your CSS Branch
Switch back to the
mainbranch, then create and switch to a new branch for your CSS file. Create a new file namedstyle.cssin the same folder. Add some simple CSS to change the text color or font, and don't forget to link this CSS file to yourindex.html! -
Commit Your CSS
Just like before, save your CSS work, include your roll number in the commit message, and push it to your repository.
-
Create JS file
Same as what you did for the HTML and CSS files.
This is the most important part! You will now combine your branches using different methods.
-
Merge the HTML Branch
First, switch to your
mainbranch and then merge yourHTMLbranch into it. This will bring yourindex.htmlfile into themainbranch and keep a record of the merge. -
Rebase the CSS Branch
Rebase your
CSSbranch onto themainbranch. -
Merge the JS Branch
Finally, merge your now rebased
mainbranch into theJSbranch. -
Attach Your Git Graph
To show us your work, please take a clear screenshot of your Git graph. Attach this image to your Pull Request.
-
Final Push and Pull Request
Once all files are in your
mainbranch, push your finalmainbranch to your repository. Then, go to GitHub and create a Pull Request to submit your work for review. The title of your Pull Request should be your roll number.
Have fun, and don't hesitate to ask us questions if you get stuck!
You think it's too easy for you? We made some unnecessary commits in updating this README. Can you squash those commits into one? And if you perform this part too, then the title of your PR should be your roll number with a -i like, "LCB20250AB -i".