Given one existing commit, revert the change the patch introduces, and record a new commit that records it. This requires your working tree to be clean (no modifications from the HEAD commit).
Note: git revert is used to record a new commit to reverse the effect of an earlier commit (often a faulty one). If you want to throw away all uncommitted changes in your working directory, you should see git-reset(1), particularly the --hard option. If you want to extract specific files as they were in another commit, you should see git-checkout(1), specifically the git checkout <commit> - <filename> syntax. Take care with these alternatives as both will discard uncommitted changes in your working directory.
만약 돌려야 한다면 한번에 될진 모르겠지만 1111, 2222를 revert 해야 할지도? (확인필요)
$ git log --oneline 17b787d bug3 fixed 1fefb57 bug2 fixed 8b3560b bug1 fixed 784065c feature1 developed ... 이제 우리는 이러한 버그 수정을 없애고 저장소를 bug1 fixed 상태 이전의 상태로 되돌리기로 결정했습니다.
따라서 --no-commit 옵션과 함께 git revert 명령을 사용할 수 있습니다. 명령 구문은 git revert --no-commit <commit>입니다.
여러개 돌릴때 마다 메시지 남기면 번거로우니 쭈르르르륵 되돌려 버릴땐 -n 옵션 주면 된다고 한다.
-n, --no-commit Usually the command automatically creates a commit with a commit log message stating which commit was reverted. This flag applies the change necessary to revert the named commit to your working tree and the index, but does not make the commit. In addition, when this option is used, your index does not have to match the HEAD commit. The revert is done against the beginning state of your index. This is useful when reverting more than one commits' effect to your index in a row.
uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength) { uint32_t index; /* CRC input data buffer index */ uint32_t temp = 0U; /* CRC output (read from hcrc->Instance->DR register) */
/* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_BUSY;
/* Reset CRC Calculation Unit (hcrc->Instance->INIT is * written in hcrc->Instance->DR) */ __HAL_CRC_DR_RESET(hcrc);
/* Enter 32-bit input data to the CRC calculator */ for (index = 0U; index < BufferLength; index++) { hcrc->Instance->DR = pBuffer[index]; } temp = hcrc->Instance->DR;
/* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_READY;
/* Return the CRC computed value */ return temp; }
2.3.3 CRC (cyclic redundancy check) calculation unit The CRC (cyclic redundancy check) calculation unit is used to get a CRC code from a 32-bit data word and a fixed generator polynomial. Among other applications, CRC-based techniques are used to verify data transmission or storage integrity. In the scope of the EN/IEC 60335-1 standard, they offer a means of verifying the Flash memory integrity. The CRC calculation unit helps compute a signature of the software during runtime, to be compared with a reference signature generated at linktime and stored at a given memory location.