0% found this document useful (0 votes)
6 views1 page

Git Task

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Git Task

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Creating and Merging Branches Locally: To start, you’ll need to create two new
branches named feature1 and feature2. In each branch, you’ll add some lines of
code and create new files as needed. Once you’ve made your changes, you’ll switch
back to the main branch. From there, you’ll merge the changes from both feature1
and feature2 into the main branch. Finally, you’ll push the merged code to your
remote repository to ensure all your changes are saved and accessible.

2. Creating and Pushing a Branch in GitHub: Begin by creating a new branch


directly on GitHub. This can be done through the GitHub interface by navigating to
your repository and using the branch dropdown to create a new branch. After
creating the branch, make some changes directly on GitHub, such as editing files and
committing those changes. Next, you’ll push code from your local machine to this
new branch using Git Bash, ensuring that your local changes are reflected in the new
branch on GitHub.

3. Creating and Merging a Pull Request: First, create an index.html file in the main
branch and push it to GitHub. Then, create a new branch from Git Bash, add a new
line to index.html, and commit the changes. Switch back to the main branch, add
another new line to index.html, and commit those changes as well. Push both the
main branch and the new branch to GitHub. After that, create a pull request on
GitHub to merge the new branch into the main branch. Review the changes and
complete the merge to integrate the updates.

4. Collaboration Task

You might also like