2012-06-10 2 views
1

git checkout removedFile 명령의 Mercurial에 해당하는 항목은 무엇입니까? removedFile이라는 단어는 git rm- 명령이 아닌 기본 - 쉘 rm- 명령에 의한 제거를 의미합니다.git checkout은 Mercurial의 파일을 삭제 했습니까?

+0

오! "삭제되었지만 버전 관리에서 제거되지 않은 파일을 어떻게 다시 얻으려면"묻는 것입니까? 그것은 훨씬 더 명확했을 것입니다. –

답변

2
hg revert removedFile 

은 누락 된 파일을 다시 넣어야합니다.

0

git checkout removedFile은 무엇을 제공합니까? 나에게는 좋은, 합리적인 오류를 줄 :

[email protected]:~$ git init test 
Initialized empty Git repository in /home/ry4an/test/.git/ 
[email protected]:~$ cd test/ 
[email protected]:~/test$ echo this > file 
[email protected]:~/test$ git add file 
[email protected]:~/test$ git commit 
[master (root-commit) 1b017c5] file added 
1 file changed, 1 insertion(+) 
create mode 100644 file 
[email protected]:~/test$ git rm file 
rm 'file' 
[email protected]:~/test$ git commit 
[master ec695d4] dsdfsdf 
1 file changed, 1 deletion(-) 
delete mode 100644 file 
[email protected]:~/test$ git checkout file 
error: pathspec 'file' did not match any file(s) known to git. 

당신이 hg cat이 그것을 할 수있는 좋은 명령입니다 제거 된 파일의 내용을 볼 수 있습니다, 당신은 hg log removedFile를 사용하여 개정 ID를 찾을 수있는 방법을 요청하는 경우 .

+0

... removedfile에 의해'$ gm rm something '이 아니고 $ rm something을 의미하지는 않습니다. 즉, git-tracking에서 여전히 fs에서 제거 된 추적 된 파일을 반환하고 싶습니다. – hhh

+0

"방금 삭제 한 파일을 어떻게 삭제합니까?"와 같은 소리가 들렸습니다. 그게 쉽고 @splattered 비트가 당신의 대답을 가지고 있습니다. –

관련 문제