<aside> 💡

</aside>

✨ Remote Repo를 Clone → 특정 Remote 브랜치를 가져와서 → 작업후 새로운 브랜치를 만들고 싶어요!


  1. Remote Repo clone 받아오기

    git clone <https://github.com/BarmiSpeechLab/backend>
    
  2. Remote와 Local에 존재하는 모든 브랜치 확인

    git branch -a
    
  3. Local로 가져오고 싶은 브랜치 가져오기 (origin/develop인 경우)

    git checkout -t origin/develop
    
  4. 원하는 ‘원격 브랜치’로 push

    git push origin temp_branch
    
  5. Github에서 pull request 요청

😭 Push 잘못돼서 파일이 다 날라갔어요 .. 어떻게 해요? ㅜㅜ

  1. git log 기록 확인하여 commit-hash 확인

    git log
    
  2. git log 결과에서 복구하고 싶은 commit에 대한 hash확인

    commit c863947404bde5c92b0a5b2f5f640f1738080199 (HEAD -> airflow, origin/airflow)
    Author: sunwoo <lsw2207@gmail.com>
    Date:   Thu Aug 28 10:01:07 2025 +0900
    
        ISSUE#6 file removed
    
  3. revert로 commit 추가하기

    git revert c863947404bde5c92b0a5b2f5f640f1738080199 
    
  4. push 해서 remote에 반영 해주기 ! (remote에 data-collection을 생성하고 싶다면)

    git push origin data-collection
    

🔀 Repo 이름을 바꾸고 싶어요