Rmate for remote editing
Rmate is a powerful plugin in VSCode for remote editing. We can edit files on remote server directly.
in VSCode:
- F1 then select
remote: start server
- In VSCode integrated terminal:
ssh -R 52698:localhost:52698 username@server_address -p server_port
cd
to the folder on server, open the file withrmate filename
Mercurial for version control
Mercurial is very similar to Git.
hg status
hg diff
hg diff -r changeset1..changeset2
hg log
hg log -G
: graph viewhg add .
hg commit -m 'my description'
hg update _identifier(changeset)_
: navigate through different versions of repohg push
Reconsiling the forks
Two ways to combine the two changes into one.
hg rebase
: update the base commit of your local commit from wherever you cloned onto their change. https://www.mercurial-scm.org/wiki/RebaseExtensionhg rebase -s X -d E
, X is the base of a fork, E is the new base.hg rebase -r Y3::Z3 -d E --collapse
, collapse Y3 and Z3 into one commit, put it after E.- conflict
hg rebase --abort
will aborthg rebase --continue
will continue
hg push
: merge two commits together.hg merge
: http://hgbook.red-bean.com/read/a-tour-of-mercurial-merging-work.htmlhg merge -r changeset1
, merge two branches- Then commit