CMS솔루션마켓, 이온디 - 워드프레스, 라이믹스, 카페24, 그누보드, 엑셀

웹기술을 같이 공유합니다

Home WEB 웹팁

1. 다른 컴퓨터에서 작업한 혹은 다른 사람이 작업한 깃을 내 컴퓨터에서 다시 다운로드 받아서 작업해야할 경우.

2. 그런데 내 컴퓨터에서도 이미 깃이 있었고, 그걸 초기화한 뒤에 해당 깃을 다운받아서 사용해야했다.

3. 먼저 깃 기본 사용법 부터 다시 확인해봤다.

https://evan-moon.github.io/2019/07/25/git-tutorial/

기본적인 사용법은 위 글에서 자세히 설명하고 있었는데, 딱 필요한 것만 다시 더 찾아봤다.


4. 비어있지 않은 디렉토리에 깃 클론을 실행하는 방법은 무엇입니까.

How do I clone into a non-empty directory?

https://stackoverflow.com/questions/2411031/how-do-i-clone-into-a-non-empty-directory

git init
git remote add origin PATH/TO/REPO
git fetch
git reset origin/master # Required when the versioned files existed in path before "git init" of this repo.
git checkout -t origin/master


5. 자, 이제 기본적인 사용방법은 알았으니, 그 다음은 젯브레인 phpstorm 에서 깃 등록 사용방법에 대해서 찾아봤다.

https://www.jetbrains.com/help/phpstorm/github.html

이 부분은 phpstorm 을 사용하지 않으신 분은 패스하면 됩니다.


6. '다른 깃헙 가져오기 cli'를 좀 더 찾아봤다.

그런데 딱 원하는 건 아니었다...

https://gist.github.com/ZeroDragon/6707408

git init


git remote add origin https|ssh:path/to/the/repository.git

git pull origin master


이대로 따라했다. 그런데,


fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions, like this:


이런 오류가 나왔다.


치명적: 모호한 인수 'origin/master': 작업 트리에 알 수 없는 개정 또는 경로가 없습니다.
다음과 같이 '--'를 사용하여 경로를 개정과 구분하십시오.


아마.. origin master 부분이 잘못된거 같았다.


7. 브랜치 네임 확인하기

https://0ver-grow.tistory.com/918



참조

https://on1ystar.github.io/git/2021/02/22/Git-2/





https://junheejang.tistory.com/221



 
댓글은 로그인 사용자만 작성 가능합니다. 로그인하기