Skip to content

Lab Question 2: Merge two branches results #11

@brgcy

Description

@brgcy

Lab Question 2: Merge two branches results

Go through following set of instructions to complete this question.

NOTE: Ensure that the repo https://github.com/cloudyuga/git-gh-course is forked in your GitHub account and your forked repo is cloned locally.

  • Create two branches with name log-list and oneline-logs
  • In the log-list branch, create a file logs.txt which should contain the output of git log command. Hint: Use redirection operator. Then, save the changes under commit message Added git log list.
  • Now, switch back to main branch and create another new branch oneline-logs. In this branch, create a file logs.txt which should contain the output of git log --oneline command. Then, save the changes under the commit message Added one line git log list.
  • Finally, switch back to main branch.
  • Merge the branch log-list to main branch.
  • Try to merge branch online-logs to main branch.
  • Resolve the conflicts. Continue with git merge. (git merge --continue`)
  • The final output of logs.txt should be same of the output of git log --online command.
  • The git log command should show following output:
zzzzz (HEAD -> main) Merge branch 'oneline-logs' into main
yyyyy (oneline-logs) Added one line git log list
xxxxx (log-list) Added git log list

Then, push the changes to your main branch to your forked REPO.

Finally, create the pull request to original repo.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions