이전 버전과 비교하기도 쉽지 않은데..

아무튼 특정 파일을 과거 버전으로 돌려 버리는 기능은 의외로 간단해 보이네?

 

[링크 : https://www.devpools.kr/2017/02/05/초보용-git-되돌리기-reset-revert/]

[링크 : https://youngest-programming.tistory.com/220]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git lfs  (0) 2021.04.06
git submodule  (0) 2021.04.05
git error: RPC failed; curl ... remote end hung up  (0) 2021.01.11
git stash  (0) 2020.01.21
git commit 간 diff  (0) 2020.01.21
Posted by 구차니

depth 문제라면.. 설마 압축하다 서버 뻗는건가?

 

[링크 : https://dukeyang.tistory.com/16]

[링크 : https://stackoverflow.com/questions/38618885]

 

에러가 한글로 나오면서 "early EOF"가 "너무 빨리 파일이 끝남" 로 나와서 좀 헤맸네

fatal: read error: Invalid argument, 255.05 MiB | 1.35 MiB/s
fatal: early EOF
fatal: index-pack failed

 

결론은.. 서버쪽 문제가 맞나보네

[링크 : https://www.lesstif.com/gitbook/git-clone-fatal-early-eof-fatal-index-pack-failed-95879326.html]

[링크 : https://pakss328.medium.com/git-early-eof-index-pack-failed-에러-처리-1d9d0357124b]

 

 

'프로그램 사용 > Version Control' 카테고리의 다른 글

git submodule  (0) 2021.04.05
git reset revert  (0) 2021.03.31
git stash  (0) 2020.01.21
git commit 간 diff  (0) 2020.01.21
git 에서 push 하지 않은 commit 확인하기  (0) 2019.11.23
Posted by 구차니

일종의 버퍼라고 해야하나?

잠시 테스트 코드 수정하고 나서 다른 리비전 오가면서 쓰는 경우도 존재할텐데

그런 테스트 코드를 일일이 다 commit 해서 보존하고

돌아와서 복구해야 한다면 버전관리시에 지저분 해지니

그러한 더러운 코드들을 잠시 저장해 두는 기능

 

조금 자세히 봐야 겠지만..

그러면 최소한 해당 리비전에서 원래 리비전으로 돌아와서 stash를 적용해주어야 문제없이 적용되려나?

 

깃으로 작업을 하던 도중, 잠시 브랜치를 변경을 해야할 일이 있거나, 다른 관련없는 작업을 시작해야 할 때,
작업을 하는 도중이라 커밋을 남기기 찝찝하다면 stash란 기능을 사용하면 된다.

stash 명령을 사용하면 modified이면서 tracked인 상태의 파일과 staging area에 있는 파일들을 보관한다.

[링크 : https://wkdtjsgur100.github.io/git-stash/]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git reset revert  (0) 2021.03.31
git error: RPC failed; curl ... remote end hung up  (0) 2021.01.11
git commit 간 diff  (0) 2020.01.21
git 에서 push 하지 않은 commit 확인하기  (0) 2019.11.23
git 리비전 오가기  (0) 2019.11.20
Posted by 구차니

한자리씩 줄여보니 4자리는 넘어야 commit hash 로 비교가 가능하다.

아래는 두 커밋간의 비교인데 diff 출력으로 나오게 되어있고

 

git diff oldCommit newCommit 
git diff k73ud dj374 

[링크 : https://stackoverflow.com/questions/3368590/show-diff-between-commits]

 

아래는 리비전간에 변화가 생긴 파일 목록만 나타내는 옵션을 사용한 예이다.

git diff --name-only HEAD~10 HEAD~5

[링크 : https://stackoverflow.com/.../how-to-list-only-the-file-names-that-changed-between-two-commits]

 

 

두 커밋간의 특정 파일을 비교하려면 마지막에 파일이름만 넣으면 된다.

$ git diff HEAD^^ HEAD main.c
$ git diff HEAD^^..HEAD -- main.c
$ git diff HEAD~2 HEAD -- main.c

[링크 : https://stackoverflow.com/.../how-do-i-diff-the-same-file-between-two-different-commits-on-the-same-branch]

 

 

+

git help diff로 하니 나오는 내용. 세번째 명령이 내가 원하는 명령어.

git diff [<options>] [<commit>] [--] [<path>…​]
git diff [<options>] --cached [<commit>] [--] [<path>…​]
git diff [<options>] <commit> <commit> [--] [<path>…​]
git diff [<options>] <blob> <blob>
git diff [<options>] --no-index [--] <path> <path>
Posted by 구차니

솔찍히 다시 원점으로 돌아가서

처음부터 봐야 할 느낌.. branch 오가거나 특정 revision 가거나 하는거

막 혼동이 온다...

 

[링크 : https://blog.outsider.ne.kr/820]

Posted by 구차니

git은 여전히 어렵다... ㅠㅠ

git의 HEAD에서 몇번째 전으로 돌아가서 그걸 다시 올리거나

[링크 : https://mytory.net/archives/10078]

 

그게 아니라면 특정 버전까지를 전부 지우는 것도 가능 한듯?

[링크 :https://medium.com/nonamedeveloper/초보용-git-되돌리기-reset-revert-d572b4cb0bd5]

 

 

+

stash 영역이란걸 알아두면 편할 듯?

리비전 오갈때 잠시 저장해 둘 수 있는 곳

[링크 : https://medium.com/@pks2974/자주-사용하는-기초-git-명령어-정리하기-533b3689db81]

Posted by 구차니

git을 전송할때 압축하는데 서버측에서 메모리 부족으로 뻗을수 있으니

로컬에서 압축하지 않고 보내도록 하면 되는 듯?

remote: Counting objects: 50044, done.
remote: aborting due to possible repository corruption on the remote side.
fatal: 프로토콜 오류: 잘못된 묶음 헤더

 

Adding git config --global pack.window "0" worked for me...along with following

git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m" 
git config --global pack.threads "1"
Reason:

Git clone compresses the data while cloning the repository

It compresses the data on the server memory before receiving the data/files.

If the server has out of memory you will get the above error while packing the objects

You can fix the issue by making git clone the repository without packing the objects on the server with the following.

git config --global pack.window "0"

[링크 : https://stackoverflow.com/questions/4170317/git-pull-error-remote-object-is-corrupted]

Posted by 구차니

로컬에서 소스 관리 하다가

서버의 특정 디렉토리에 이력을 같이 넣고 싶어서 방법을 찾는 중

 

[링크 : https://mansoo-sw.blogspot.com/2017/08/git-repository-merge.html]

[링크 : https://luckyyowu.tistory.com/352]

[링크 : https://backlog.com/git-tutorial/kr/stepup/stepup7_4.html] cherry-pcik

[링크 : https://stackoverflow.com/questions/1214906/how-do-i-merge-a-sub-directory-in-git]

Posted by 구차니

특정 디렉토리를 제외하려면 그냥 적고

그 안에 특정 파일은 버전관리 하려면

!/path/filename

으로 적어주면 된다.

[링크 : https://stackoverflow.com/questions/987142/make-gitignore-ignore-everything-except-a-few-files]

Posted by 구차니

centos 에서 서비스 명을 겨우 찾음.. -_-


# ll /etc/systemd/system/basic.target.wants

합계 0

lrwxrwxrwx. 1 root root 41  1월 16  2017 firewalld.service -> /usr/lib/systemd/system/firewalld.service

lrwxrwxrwx. 1 root root 47  1월 16  2017 gitlab-runsvdir.service -> /usr/lib/systemd/system/gitlab-runsvdir.service

lrwxrwxrwx. 1 root root 41  1월 16  2017 microcode.service -> /usr/lib/systemd/system/microcode.service 

[링크 : https://www.digitalocean.com/.../how-to-use-systemctl-to-manage-systemd-services-and-units]


# systemctl status gitlab-runsvdir

● gitlab-runsvdir.service - GitLab Runit supervision process

   Loaded: loaded (/usr/lib/systemd/system/gitlab-runsvdir.service; enabled; vendor preset: disabled)

   Active: active (running) since 화 2019-01-22 12:42:45 KST; 3 weeks 3 days ago

 Main PID: 620 (runsvdir)

   CGroup: /system.slice/gitlab-runsvdir.service

           ├─  620 runsvdir -P /opt/gitlab/service log: ....................................................................

...

           ├─18710 sleep 3000

           └─18789 sleep 1


 1월 22 12:42:45 localhost.localdomain systemd[1]: Started GitLab Runit supervision process.

 1월 22 12:42:45 localhost.localdomain systemd[1]: Starting GitLab Runit supervision process... 


설치

[링크 : https://wikidocs.net/16279]

[링크 : https://blog.asamaru.net/2015/09/22/how-to-install-gitlib-on-centos/]


업그레이드 및 중지

[링크 : https://hreeman.tistory.com/79]


자동실행

[링크 : https://stackoverflow.com/questions/27983295/gitlab-autostart-on-boot]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git 저장소 합치기  (0) 2019.06.03
gitignore 특정 파일은 예외에서 제외시키기  (0) 2019.04.17
git branch  (0) 2019.01.29
git 윈도우 자격증명 관리  (0) 2019.01.16
git tag  (0) 2018.12.07
Posted by 구차니