- created new repo in GitHub (https://github.com/alexfr26/asd-mid-gitflow.git)
- git init && git branch -M master
- git remote add origin https://github.com/alexfr26/asd-mid-gitflow.git
- echo "# ASD 1: Git Workflow" >> CHANGELOG.md
- git add CHANGELOG.md && git commit -m "initial commit"
- git push origin master
- git switch -c develop
- git branch feature-one && git branch feature-two && git switch -c feature-three
5. On branch feature-three make 3 commits, each of these commits should add new content to the file f3.txt: f3.1, f3.2, f3.3
- echo "f3.1" >> f3.txt && git add f3.txt && git commit -m "created f3 -> f3.1"
- echo "f3.2" >> f3.txt && git add f3.txt && git commit -m "updated f3 -> f3.2"
- echo "f3.3" >> f3.txt && git add f3.txt && git commit -m "updated f3 -> f3.3"
- git switch feature-one
- echo "f1.1" >> f1.txt && git add f1.txt && git commit -m "created f1 -> f1.1"
- echo "f1.2" >> f1.txt && git add f1.txt && git commit -m "updated f1 -> f1.2"
- git switch feature-two
- echo "f2.1" >> f2.txt && git add f2.txt && git commit -m "created f2 -> f2.1"
- echo "f2.2" >> f2.txt && git add f2.txt && git commit -m "updated f2 -> f2.2"
- git switch feature-one
- git log --oneline feature-three (to take sha1 of the 2nd commit) // ac753b5
- git cherry-pick ac753b5 // confict appeared
- git add f3.txt // resolve it by adding the file to the curent git branch
- git cherry-pick --continue // can rename commit
9. Create a new hotfix branch from master called hotfix-one, create file hotfix.txt with content: hotfix
- git switch -c hotfix-one master
- echo "hotfix" >> hotfix.txt && git add hotfix.txt && git commit -m "hotfix"
- git switch master && git merge hotfix-one
- git switch develop && git merge hotfix-one
- git branch -d hotfix-one // delete if this branch is not needed
- git switch feature-one && git rebase develop
- git switch develop && git merge --squash feature-one
- git commit -m "merged feature-one branch using squash"
- git switch feature-two && git rebase develop
- git switch develop && git merge --squash feature-two
- git commit -m "merged feature-two branch using squash"
- git switch master && git merge --squash develop
- git commit -m "merged develop branch"
- git push origin master
- on GitHub page create new release