Centos7 에 git설치
layout: post title: centos7 에 git설치 categories: centos git tags: centos git –
centos7 에 git설치
git 설치
yum install git
사용자 추가
git config --global user.name "id"
git config --global user.email "id@domain"
git저장소 추가
git init –bare test.git
git init test.git
기존에 가지고 있던 프로젝트를 서버에 test.git 디렉토리에 update시킨다. 그후 add시켜줌.
git add project_dir
커밋한다.
git commit -m "first commit"
원격지에서 사용할수 있도록 셋팅한다.
git init --bare
push시에 rejected발생시아래 설정 branch is currently checked out error: refusing to update checked out branch: refs/heads/master error: By default, updating the current branch in a non-bare repository error: is denied, because it will make the index and work tree inconsistent
git config --bool core.bare true
이후 이클립스에서 egit을 이용해 git을 클론시키고 프로젝트를 checkout받은다음에 import시켜준다.(다시 상세화 하겠음)
사용자를 별도 계정으로 만들었는데 rsa키를 만들어서 등록해야겠다…push할때 오류남.. => 일단 root로 설정해서 해결했음. 향후 key방식으로 변경 해야 함.