-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
Description
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-listandoneline-logs - In the
log-listbranch, create a filelogs.txtwhich should contain the output ofgit logcommand. Hint: Use redirection operator. Then, save the changes under commit messageAdded git log list. - Now, switch back to
mainbranch and create another new branchoneline-logs. In this branch, create a filelogs.txtwhich should contain the output ofgit log --onelinecommand. Then, save the changes under the commit messageAdded one line git log list. - Finally, switch back to
mainbranch. - Merge the branch
log-listtomainbranch. - Try to merge branch
online-logstomainbranch. - Resolve the conflicts. Continue with git merge. (git merge --continue`)
- The final output of
logs.txtshould be same of the output ofgit log --onlinecommand. - The
git logcommand 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.
Reactions are currently unavailable