[오류해결] fatal: Unable to create '~~/.git/index.lock': File exists.
·
Git & GitHub/오류해결
git에 이유 모를 에러가 발생해서 강제종료되었다. 그래서 다시 git을 실행하여 git add 명령어를 사용했는데 아래와 같은 에러가 발생할 때가 있을 것이다. $ git add . fatal: Unable to create '디렉토리/.git/index.lock': File exists. Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earl..
[Spring Boot][오류해결] Executing an update/delete query
·
JAVA/오류해결
스프링 부트를 사용할 때 네이티브 쿼리를 통해 JPARepository를 다루는 경우가 있다. 그런데 아래와 같은 오류가 발생할 때가 있다. Resolved [org.springframework.dao.InvalidDataAccessApiUsageException: Executing an update/delete query; nested exception is javax.persistence.TransactionRequiredException: Executing an update/delete query] TransactionRequiredException이 발생한 것인데, update/delete 쿼리를 실행할 때 @Transactional을 붙여주지 않았기 때문에 발생한 에러이다. 문제의 코드 publ..
[Git] git으로 원격저장소 다루기 (push, pull, clone)
·
Git & GitHub/Git
Git과 Github 를 사용하기 위해서는 원격 저장소가 필요하다. 원격 저장소를 이용하면 개인 프로젝트를 깃헙이라는 클라우드에 백업할 수도 있고, 만약 오픈소스라면 다른 사람들과 협업도 가능하기 때문에 개발자라면 반드시 사용할 줄 알아야한다. 그러면 깃을 이용하기 위해 Repository를 만들고 깃 배쉬를 통해 연결하는 과정에 대해서 알아보자! 1. 원격 저장소 생성하기 일단 깃허브에 로그인해서 Repositories에 들어간다. (깃허브 주소 : https://github.com/ ) New버튼을 클릭하면 새로운 저장소를 만드는 창이 뜨고 아래와 같이 저장소 이름을 적어준다. 원하면 Descrption을 적어도 된다. 만약 아래부분의 체크박스를 체크하면 원격저장소 연결이 번거로워질 수도 있으니 웬만..
[Git] git rebase 사용하기
·
Git & GitHub/Git
아래와 같은 로그가 있다고 해보자. $ git log commit 4b38800ffd950b6d9ee7d9e498cb813c4bb6196c (HEAD -> master) Author: BigBell Date: Sat Feb 12 14:45:52 2022 +0900 댓글기능완료 commit fbf1cb943bc5f651af389935089fd34d0ff2927f Author: BigBell Date: Sat Feb 12 14:45:26 2022 +0900 댓글기능2 commit 90dc548ae0bfaa3328fca93bad686fa37045f23d Author: BigBell Date: Sat Feb 12 14:44:34 2022 +0900 댓글기능1 commit 34e07046d9e9e3d11278ef..
[오류해결][Git] merge Conflict 해결
·
Git & GitHub/오류해결
$ git merge my Auto-merging 기능.txt CONFLICT (content): Merge conflict in 기능.txt Automatic merge failed; fix conflicts and then commit the result. 한 프로젝트를 가지고 브랜치를 나눠서 서로 다른 작업을 하다보면 프로젝트 수정하는 부분이 겹칠 수도 있다. 이 때 git merge 명령어를 통해 브랜치를 합병하면 위와 같은 오류가 발생할 수 있다. Automatic merge failed; fix conflicts and then commit the result. 해석해보자면, 합병에 실패했다. 충돌되는 부분을 수정하고나서 커밋하라는 말이다. 만약 main 브랜치와 my 브랜치가 있다고 해보자...
[Git] git branch 사용하기
·
Git & GitHub/Git
Git branch 개념 배우기 👇👇👇👇👇👇 https://myvelop.tistory.com/99?category=917184 1. 메인 브랜치와 새로운 브랜치 만들기 git branch를 사용하는 방법은 위 개념배우기에서 사용했던 시나리오를 그대로 사용하도록 하겠다. - 메인 브랜치 만들기 $ git init ## 홈페이지 만들기 ## $ touch 홈페이지.txt $ git add . $ git commit -m "홈페이지" ## 홈페이지 만들기 완료 ## ## 게시판 만들기 ## $ touch 게시판.txt $ git add . $ git commit -m "게시판" ## 게시판 만들기 완료 ## ## 댓글 기능 만들기 ## $ touch 댓글기능.txt $ git add . $ git commi..