[petsc-dev] Usability

Jed Brown jedbrown at mcs.anl.gov
Mon Mar 11 18:36:47 CDT 2013


On Mon, Mar 11, 2013 at 6:14 PM, Satish Balay <balay at mcs.anl.gov> wrote:

> As I understand it [from discussing with Jed] - 'git HEAD' is
> equivalent to 'hg parent'.
>

'git HEAD' is not a command, but 'HEAD' can be used anywhere a <commit> is
expected. HEAD points at either a branch name (e.g., 'jed/feature1') or
(only for "detached HEAD" -- this is not part of normal workflow) directly
at a commit.

$ git status
# On branch jed/feature1
nothing to commit, working directory clean

It is displayed (along with other info like merge state) in __git_ps1.

But I'm not sure what the equivalent of 'hg head' is.
> [which is where all dangling heads would be captured - and
> hg would warn/force a merge - before push]
>

Git does not have "anonymous heads" so if you want to refer to something
later, you should use a branch. You can make a branch and check it out with
'git checkout -b branch-name'.

Hg allows anonymous heads and 'hg head' shows all by default. Git show all
branches with 'git branch', and you can use 'git branch --merged' to see
all branches that have been merged into the current branch and 'git branch
--no-merged' for the converse. Add '-v' for more details about the branch.
Is this what you were looking for?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130311/0a61708b/attachment.html>


More information about the petsc-dev mailing list