Merge commit with semi-linear history

Merge commit with semi-linear historyrebase 를 사용하며 merge 커밋을 남기는 전략이다.

With --no-ff Generate a merge commit even if the merge resolved as a fast-forward. merge 시에 --no-ff 옵션을 주면 fast-forward 관계더라도 merge commit 이 남는다. -m 옵션을 같이 주면 머지 커밋 메시지를 남길 수 있다.

Commands:

git checkout -b feature/xxx # Create feature branch
git commit -m "Message" # Commit
git rebase origin/develop # Rebase 
git checkout develop 
git merge --no-ff feature/xxx # Merge - Generated merge commit
# git merge --no-ff -m "Merge branch 'branch-name' into 'master'"