> For the complete documentation index, see [llms.txt](https://roharon.gitbook.io/hufs-missing-semester/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roharon.gitbook.io/hufs-missing-semester/undefined/rebase.md).

# git rebase

## rebase?

rebase를 통해 커밋 히스토리에 대한 수정 작업이 가능합니다. base를 재지정하는 커맨드입니다

base...?를 재지정...? base는 무엇이고 왜 재지정하는 걸까요? 🤔 글을 읽으며 알아보도록 겠습니다

```
$ git rebase -i HEAD~2
```

{% hint style="info" %}
&#x20;기능 단위 브랜치에서 작업 할때 main 혹은 develop브랜치에서 최신 코드를 가져와야 하는 상황

Merge를 하기엔 커밋 로그가 남는게 곤란하다면?

이럴 때 rebase 커맨드를 통해 Merge없이 코드를 업데이트 할 수 있습니
{% endhint %}

*작성 중*
