I have uploaded files to a server (CentOS) via FTP. On the laptop, I've been using Mercurial for ages. I'd like to have Mercurial on the server as well, so I can push changes the right way.
I would like to know if the following steps are correct and would not lead to data loss:
hg init
on server (cannot get server to laptop to work, so no hg clone
) hg push
all revisions to server hg update
the server to the latest revision hg pull
changes to laptop. I have done steps 1 and 2, but am afraid hg update
on the server will mess up files which are already there (they should be identical to the laptop, but I can't take chances).
Will hg update
modify existing files?
Will hg update
accept existing files that are identical to the repository, or will it create conflicts for them?
Will hg update
mark inconsistencies as conflicts/added/missing?
I am aware that hg update -C
does the opposite of what I want. Does that mean it is safe to use without -C
?
Many thanks in advance!
If I'm understanding what you're after, you can do it this way:
hg update
I believe that hg up
will do what you're asking (keeping your changes, showing merge conflicts, etc.) but why not back it all up first and find out!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.