2014-12-23 4 views
-1

프로젝트를 오픈 쉬프트하고 있습니다. 내가 커밋하고 내 자식 원격 호스트에서 몇 가지 변경을 밀어 우연히 서버에 ssh 로깅 후 그들을 삭제했습니다. 저는 그것들을 다시 추가하려고 시도하고 그들을 강제로 밀어 넣었습니다. 그러나 내가 저 지르면 저 지르지 않을 것이라고 말합니다. 나는 강요하려고했지만 모든 것이 최신이라고 말합니다. 되돌릴 필요없이 무언가를 다시 시작할 수있는 방법이 있습니까? 우연히 삭제 한 후 디렉토리를 원격 git으로 푸시

git add path/to/my/directory/ 
git commit -m "Re commiting" 
On branch master 
Your branch is up-to-date with 'origin/master'. 

nothing to commit, working directory clean 

내가 내 디렉토리를-밀어 다시 어떻게

git push -f 
warning: push.default is unset; its implicit value is changing in 
Git 2.0 from 'matching' to 'simple'. To squelch this message 
and maintain the current behavior after the default changes, use: 

    git config --global push.default matching 

To squelch this message and adopt the new behavior now, use: 

    git config --global push.default simple 

When push.default is set to 'matching', git will push local branches 
to the remote branches that already exist with the same name. 

In Git 2.0, Git will default to the more conservative 'simple' 
behavior, which only pushes the current branch to the corresponding 
remote branch that 'git pull' uses to update the current branch. 

See 'git help config' and search for 'push.default' for further information. 
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 
'current' instead of 'simple' if you sometimes use older versions of Git) 

Everything up-to-date 

이를 시도?

답변

0

내가 openshift에 익숙하지 않아요하지만 난 자식 가 있다고 가정 특정 작업 디렉토리에 master 브랜치를 체크 아웃 서버에 훅을 후받을 수 있습니다.

원격 서버에서이 훅의 내용을 확인해야합니다 (과 같은 위치에 이어야합니다). 더 감사 가능성, 그것은과 유사한 명령이 포함됩니다 : 망할 놈의 사용자로 로그인 한 상태

GIT_DIR=~git/repositories/project.git/ GIT_WORK_TREE=/var/www/vhosts/project git checkout -f master 

당신은 그 명령을 실행해야합니다을; 다른 사용자가 으로 실행하면 파일 사용 권한 문제가 발생합니다.

관련 문제