Workflow examples for Mercurial¶
Important note: All of this assumes that Mercurial is being used in a situation with a single remote repository, and that I never push or pull to or from anywhere else (i.e. no peer-to-peer working).
Situations that might be considered the beginning of a "workflow unit"...
- Someone just gave me a URL (e.g. https://code.soundsoftware.ac.uk/hg/svcore) and told me to clone it [i.e. I know the remote URL but have no local copy yet]
- I have a directory of source code on my local computer and I want to "put it under version control" [i.e. I know the local location but have no repository or remote URL yet]
- I have been working on this local repository before, using another Hg tool, and it has a remote location already [i.e. I have both the local copy and the remote URL and I just need to tell the tool what they are]
- I have made a new file and I want to commit it
- I have changed some files and I want to commit them
- I want to rename or remove a file
- I have already renamed or removed a file (using Finder etc) and have only just remembered I was supposed to do it using the version control tool -- what now?
Pushes and pulls¶
- I have made some changes locally and want to make sure they're published because I'm about to go home [with the assumption: Nobody else has changed the remote repository in the mean time]
- I have made some changes locally and want to make sure they're published because I'm about to go home [with the assumption: Someone else has changed the remote repository in the mean time, but I don't know it yet]
- I know that someone else has made some changes to the remote repository, and I want to get them
- I want to know whether anyone else has made any changes to the remote repository [though perhaps ideally the tool would tell me automatically]
- I can't remember whether I pushed my last set of changes -- can you tell me?