You are working in a development environment with a Git repository that has multiple branches and commits. Your task is to write a Git command to modify the base of a branch.
The repository is set up as follows:
The
mainbranch has an initial commit;A
featurebranch is created frommain. Onfeature, a commit "Feature commit 1" is made;An
updatebranch is created from thefeaturebranch at the state of "Feature commit 1";Then, on the
featurebranch, another commit "Feature commit 2" is added;Finally, on the
updatebranch, a commit "Update commit 1" is created.
Your task is to rebase the update branch so that its base is updated from "Feature commit 1" to "Feature commit 2". In other words, after rebasing, the parent of "Update commit 1" on the update branch should be "Feature commit 2" (the latest commit on feature).
Write your Git command(s) below line by line.