Get it on Google Play


Wm뮤 :: '깃허브' 카테고리의 글 목록

블로그 이미지
가끔 그림그리거나 3D모델링하거나
취미로 로봇만드는
퇴직한 전자과 게임프로그래머
2020.3.48f1 , 2022.3.6f1 주로 사용
모카쨩
@Ahzkwid

Recent Comment

Archive


2023. 8. 27. 15:19 깃허브

 

이쯤되면 딱봐도 감이 잡힐텐데

gitignore 열어보면

 

이런식으로 되어있다

 

이런식으로 폴더예외 추가함

[Tt]이런건 temp랑 Temp 둘다라는 뜻

 

참고로 이미 커밋해서 올라간건 적용 안 되드라;

 

 

https://stackoverflow.com/questions/6618612/ignoring-a-directory-from-a-git-repo-after-its-been-added

이런거 찾긴 했는데 안 지워지길래 그냥 위에있는 AssetStoreTools폴더 만들어서 그 하위로 옮기는거로 땡침

근데 원래 이 폴더 에셋스토어에 올리는 파일이 들어있는 폴더다

 

posted by 모카쨩
2022. 6. 25. 12:04 깃허브

 

 

 

git clone --mirror https://github.com/userID/RepoOrigin.git
cd RepoOrigin.git
git remote set-url --push origin https://github.com/userID/RepoClone.git
git push --mirror

 

 

이렇게 하고 다운받으면 된다

 

 

근데 해보니까 처음 퍼블리싱한게 충돌나서 홈피에서 만들고 해야할듯...

 

 

 

posted by 모카쨩
2022. 6. 9. 18:02 깃허브

 

 

일반적으로 프로젝트를 끄고나서 올리면 해결된다

만약 그래도 안 된다면 아래를 참고

 

 

 

리눅스,맥 에서는 LF

초창기 맥에서는 CR

윈도우에서는 CRLF를 써서 발생하는 문제이다

 

 

윈도우 명령어

git config core.autocrlf true

 

리눅스,맥 명령어

git config core.autocrlf true input

 

저거 치면 자동변환된다

 

그러고도 안되면 그냥 프로젝트를 끄고 올리면 된다

'깃허브' 카테고리의 다른 글

깃허브 복사  (0) 2022.06.25
You have divergent branches and need to specify how to reconcile them  (0) 2022.05.17
소스트리 사용법  (0) 2022.02.19
posted by 모카쨩
2022. 5. 17. 12:49 깃허브

 

 

 

hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

 

 

분기있어서 그런건데

그냥 커밋 취소하고 Pull 받고 다시 커밋푸시하면 된다

'깃허브' 카테고리의 다른 글

warning: LF will be replaced by CRLF in  (0) 2022.06.09
소스트리 사용법  (0) 2022.02.19
깃허브 이슈관련  (0) 2022.01.11
posted by 모카쨩
2022. 2. 19. 01:02 깃허브

 

 

설치법

 

 

 

 

 

 

 

 

posted by 모카쨩
2022. 1. 11. 01:25 깃허브

 

 

 

 

 

이슈에 커밋해시 붙여넣는법

더보기

커밋에 우클릭후 SHA를 복사해서 붙여넣으면 된다

'깃허브' 카테고리의 다른 글

소스트리 사용법  (0) 2022.02.19
unable to restore stash when changes are present on your branch  (0) 2021.11.22
깃허브 머지 충돌 대응법  (0) 2021.11.03
posted by 모카쨩
2021. 11. 22. 18:01 깃허브

했더니 증발했다...어? Discard를 해야하나...

'깃허브' 카테고리의 다른 글

깃허브 이슈관련  (0) 2022.01.11
깃허브 머지 충돌 대응법  (0) 2021.11.03
GitHub Desktop 레포지토리 폴더 옮기는 방법  (0) 2021.10.10
posted by 모카쨩
2021. 11. 3. 19:10 깃허브

 

 

 

 

-스크립트 충돌시

 

해당 스크립트를 열어서 병합 편집기를 연다

 

 

충돌난곳에 모두 체크표시를 한다

한개를 빼야한다면 해당코드에 체크해제를 누른다

 

 

병합 수락을 누른다

 

 

깃헙데스크톱에서 누른다

 

 

머지를 누른다

 

 

 

 

 

 

 

-씬 충돌시

 

-구버전

더보기

https://docs.unity3d.com/Manual/SmartMerge.html

 

Unity - Manual: Smart merge

Using external version control systems with Unity Smart merge Use the UnityYAMLMerge tool to merge sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments,

docs.unity3d.com

 

 

 

한쪽에서 스피어를 추가한후에 받는쪽에서 큐브를 추가하고 머지충돌이 난 상태다

 

1번

 

2번

 

 Abort merge를 눌러 빠져나간다

 

 

 

 

해당 프로젝트 폴더를 연다

 

 

 [merge]
        tool = unityyamlmerge

        [mergetool "unityyamlmerge"]
        trustExitCode = false
        cmd = 'C:\\Program Files\\Unity\\Editor\\Data\\Tools\\UnityYAMLMerge.exe' merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"

해당 위치에서 git config를 열어서 위 내용을 추가해준다

 

https://docs.unity3d.com/Manual/SmartMerge.html

여기에 원본코드가 있고 cmd에서 git config -E를 쳐서 수정해줘도 된다.

난 cmd가 안 익숙한 세대라서 그냥 메모장으로 했다

 

 

 

 

다시 pull을 시도해서 cmd를 연다

 

git mergetool --tool=unityyamlmerge

 를 입력한다

y를 쳐준다

쏼라쏼라 다 되었다

 

그리고 여기서 n을 누르거나 해서 파일이 꼬인상태에서 또 시도하면 위처럼 되는데

씬이 작살날수 있으므로 조심하자

 

잘 합쳐진 모습

 

아직 끝이 아니다

 

 

합칠때 사본을 생성하기 때문에 지워둔다.

 

머지한 내용을 푸시한다

 

 

 끝

 



 

-신버전 (2019이상?)

 

일단 급한불은 꺼졌다

하지만 합칠때마다 이 귀찮은짓을 할수는 없는노릇이다

 

자동화를 해보자

 

아래 링크를 참조했다

https://github.com/github-for-unity/Unity/issues/848

 

 

# Unity files
*.meta -text merge=unityamlmerge diff
*.unity -text merge=unityamlmerge diff
*.asset -text merge=unityamlmerge diff
*.prefab -text merge=unityamlmerge diff

어튜리뷰트를 사진처럼 설정해주고 커밋한다

그럼 이제 자기가 알아서 합쳐준다

 

 

하나씩 추가해서 또 머지해본 모습

 

 

 

 

 

나중에서야 안건데 위에 config설정은 구버전만 하는거고

요즘 버전은 어트리뷰트만 잘 넣어주면 자동으로 잘 된다...

 

수동머지도 git mergetool --tool=unityyamlmerge 만 쳐주면 잘 될듯 ㅡㅡ;

 

 

 

씬 머지는 만능이 아니므로 가급적 작업전에 미리 수정한다고 말하자

 

 

 

빌드세팅의 경우 머지시 오류나는 일이 잦으므로 .asset병합은 푸는게 나을지도

 

 

posted by 모카쨩

  • total
  • today
  • yesterday

Recent Post

저사양 유저용 블로그 진입