[I want to have my repo up-to-date --> I will first pull changes from upstream]
git log --oneline --graph --all
git pull --help [not sure about the syntax --> check the docs]
git pull upstream --rebase [git complains about not knowing which branch to pull from --> nothing has changed after this command]
git pull upstream main --rebase
git log --oneline --graph --all [my commits from HW1 were added on top of commits from the upstream]
[do HW2]
[1. create the file]
touch class3_homework/456675.txt
[write into it using any text editor]
[2. push it to origin]
git add class3_homework/456675.txt
git commit -m "hw2: added file describing what I've learnt so far"
git log --oneline --graph --all
git status ["Your branch and 'origin/main' have diverged, use git pull"]
git pull origin main [I wanted to see how git solves this situation so I did not use --rebase]
git status ["Your branch is ahead of 'origin/main' by 6 commits, use git push"]
git log --oneline --graph --all
git push -u origin main
git log --oneline --graph --all
[3. create a merge request to upstream]
git pull upstream main [just to be sure: git wrote "Already up to date.", just as I could see in the log]
git push --help [not sure how to create MR from CL --> check the docs]
git merge --help
[in the end, I found this page: https://docs.oracle.com/en/cloud/paas/visual-builder/visualbuilder-manage-development-process/create-merge-request-command-line.html whose commands I tried to replicate]
[this is the CL command that I've put togther: git push -o mr.target=main -o mr.summary="HW2: merge changes from fork (456675)" upstream main]
[still, I am not sure if/how to create a merge request via CL and I don't want to "harm" the upstream --> I rather created the MR from GitLab GUI :/]
[4. create the commands file and push it to origin - same as in HW1, so I'm not listing the commands here]