-
Notifications
You must be signed in to change notification settings - Fork 5
/
basic_mercurial_instructions.txt
executable file
·57 lines (39 loc) · 1.76 KB
/
basic_mercurial_instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
This file gives some very basic examples of how to work with
Mercurial.
* To get more help
Most commands issued like `hg CMD` have help which can be displayed
by `hg help init`. Obviously the information in this file is a vast
simplifiation of Mercurial - it only lists a subset of
functionality as well as a subset of functionality for each tool.
This file is no substitute for actually knowing what you are doing.
One tutorial is at: http://hginit.com/
* GUIs to Mercurial
There are lots of them; use them if you like. I don't, so I can't
recommend any.
* Clone the repository from bitbucket
`hg clone ssh://[email protected]/berkeleylab/rtunetwork`
This (presumably) doesn't require a password but needs public
keys uploaded to bitbucket.
`hg clone https://[email protected]/berkeleylab/rtunetwork`
Authenticates using username/password.
* Pull changes from the bitbucket repository into the local repository
`hg pull`
This will grab all changes from the default path, which by default
is the bitbucket repository. Takes an argument for a source as desired.
* Push changes from the local repository to the bitbucket repository
`hg push`
Pushes all changes to the default path.
* Check status
Meaning to see the difference between the current directory state
and the state of the directory at the last commit.
`hg status`
If a file doesn't show up, it is tracked but unmodified.
M = File is tracked and modified, changes yet to be committed.
? = File is not tracked by the Repository.
* See history
`hg log`
This will display revision history for the entire repository.
* Add a file to the repository
Mercurial will not track a file unless you explicitly add it to the
repository.
`hg add FILENAME`