0

I have a folder(b) inside another folder(a) which was already pushed into a repository, and i want to push folder(b) to the bitbucket using macHg but I want it to push it so in bitbucket it looks like a new folder, right now when i pushed it it just made a new head it didn't put the whole folder in there. How can I push the whole folder so on bitbucket would look like

Folder A

  • Folder B
    • file
4

1 回答 1

1

如果你跑hg status,你会得到什么?你应该得到这样的输出:

zck@zck-desktop:~/my-test$ hg status
? a/b/file

问号表示 mercurial 还不知道a/b/file。所以让我们告诉它跟踪文件。这只是一个本地命令,还不会影响远程服务器。

zck@zck-desktop:~/my-test$ hg add a/b/file
zck@zck-desktop:~/my-test$ hg status
A a/b/file

A意味着该文件刚刚添加。现在我们只需要提交(这是另一个本地命令)。

zck@zck-desktop:~/my-test$ hg commit -m "added a/b/file, with contents in it?"

最后,我们需要将变更集推送到远程服务器。这是我们完成的唯一一个触及远程服务器的命令。

zck@zck-desktop:~/my-test$ hg push
于 2013-01-23T04:44:08.633 回答