Skip to main content

CLI Reference

hf

 hf [OPTIONS] <SUBCOMMAND>

Options

  • -v, --verbose

Subcommands

  • daemon Daemon management commands
  • repository Repository management commands
  • gui Open the GUI in the browser
  • merge Finish your WIP and merge it into trunk
  • diff Diff current WIP with trunk
  • delete Delete the given WIP
  • conflicts Conflicts related commands
  • github Github related commands
  • switch Switch to a different WIP
  • pull Pull the latest changes from trunk into your WIP
  • title Set or show the title of the current WIP
  • list List all WIPs
  • create Create a new WIP
  • duplicate Duplicate an existing WIP
  • status Show the current WIP status
  • version Print version information
  • revert Revert an entire WIP
  • discard Discard all changes in the specified file (e.g. "main.rs") by restoring that file to the version from trunk. Danger: this will delete all the changes you made to the specified file
  • review Code review related commands
  • hide Keep a file local (don't upload this file's changes, and don't make it part of your WIPs)

hf daemon

Daemon management commands

hf daemon <SUBCOMMAND>

Subcommands

  • ping Detect whether daemon is running (just answers 'pong')

hf daemon ping

Detect whether daemon is running (just answers 'pong')

hf daemon ping 

hf repository

Repository management commands

hf repository <SUBCOMMAND>

Subcommands

  • add Add a repository
  • remove Remove a repository
  • list List currently watched repositories

hf repository add

Add a repository

hf repository add [OPTIONS] [DIR]

Args

  • [DIR] Repository directory to add, without this parameter it uses the current directory

Options

  • --no-init-check

hf repository remove

Remove a repository

hf repository remove [DIR]

Args

  • [DIR] Repository directory to remove, without this parameter it uses the current directory

hf repository list

List currently watched repositories

hf repository list 

hf gui

Open the GUI in the browser

hf gui 

hf merge

Finish your WIP and merge it into trunk

hf merge [OPTIONS] [DESCRIPTION]

Args

  • [DESCRIPTION] Description of the commit. Default: the WIP's title

Options

  • --ignore-review Merge to trunk directly even if there's an open review (instead of merging that pull request)

hf diff

Diff current WIP with trunk

hf diff [WIP_ID]

Args

  • [WIP_ID] Show diff for this WIP (default: current WIP)

hf delete

Delete the given WIP

hf delete [WIP_ID]

Args

  • [WIP_ID] The id of WIP to delete

hf conflicts

Conflicts related commands

hf conflicts <SUBCOMMAND>

Subcommands

  • list List detected conflicts
  • run Run conflict detection now
  • merge-check Check if current WIP can be merged into trunk without conflicts
  • show Show conflicts with specified conflict number
  • clear Clear saved conflicts list

hf conflicts list

List detected conflicts

hf conflicts list 

hf conflicts run

Run conflict detection now

hf conflicts run 

hf conflicts merge-check

Check if current WIP can be merged into trunk without conflicts

hf conflicts merge-check 

hf conflicts show

Show conflicts with specified conflict number

hf conflicts show [NUMBER]

Args

  • [NUMBER]

hf conflicts clear

Clear saved conflicts list

hf conflicts clear 

hf github

Github related commands

hf github <SUBCOMMAND>

Subcommands

  • auth Authenticate with the GitHub app
  • test Tests the GitHub integration by listing the open pull requests of your repository

hf github auth

Authenticate with the GitHub app

hf github auth 

hf github test

Tests the GitHub integration by listing the open pull requests of your repository

hf github test 

hf switch

Switch to a different WIP

hf switch [WIP_ID]

Args

  • [WIP_ID] The id of WIP to switch to (e.g. GT-100)

hf pull

Pull the latest changes from trunk into your WIP

hf pull [OPTIONS] [ALL|WIP_ID]

Args

  • [ALL|WIP_ID] Pull changes into this WIP (default: current WIP), or 'all' for all WIPs

Options

  • -w, --write-conflicts Write all conflicting changes to your files marked by special conflict markers

hf title

Set or show the title of the current WIP

hf title [OPTIONS] [NEW_TITLE]

Args

  • [NEW_TITLE] New title for WIP, if empty, will print the current title

Options

  • -e, --edit Edit title in the editor

hf list

List all WIPs

hf list <SUBCOMMAND>

Subcommands

  • all Also display other people's WIPs

hf list all

Also display other people's WIPs

hf list all 

hf create

Create a new WIP

hf create [NEW_TITLE]

Args

  • [NEW_TITLE] Title for the newly created WIP

hf duplicate

Duplicate an existing WIP

hf duplicate [WIP_ID]

Args

  • [WIP_ID] The WIP that the new WIP should be based off of (default: current WIP)

hf status

Show the current WIP status

hf status [WIP_ID]

Args

  • [WIP_ID] Show status for this WIP (default: current WIP)

hf version

Print version information

hf version 

hf revert

Revert an entire WIP

hf revert [WIP_ID]

Args

  • [WIP_ID] Revert a merged WIP (e.g. "EM-123") by creating a new WIP with the inverted changes

hf discard

Discard all changes in the specified file (e.g. "main.rs") by restoring that file to the version from trunk. Danger: this will delete all the changes you made to the specified file

hf discard [FILE_PATH]

Args

  • [FILE_PATH]

hf review

Code review related commands

hf review <SUBCOMMAND>

Subcommands

  • create Create a code review (pull request) for the current WIP
  • update Update the code review (pull request) with the latest changes of the current WIP, so the reviewers can see them
  • merge Finish the review and merge the WIP into trunk

hf review create

Create a code review (pull request) for the current WIP

hf review create [DESCRIPTION]

Args

  • [DESCRIPTION] Description of the commit. Default: the WIP title

hf review update

Update the code review (pull request) with the latest changes of the current WIP, so the reviewers can see them

hf review update [DESCRIPTION]

Args

  • [DESCRIPTION] Description of the commit. Default: the WIP title

hf review merge

Finish the review and merge the WIP into trunk

hf review merge [DESCRIPTION]

Args

  • [DESCRIPTION]

hf hide

Keep a file local (don't upload this file's changes, and don't make it part of your WIPs)

hf hide <SUBCOMMAND> [FILENAME]

Args

  • [FILENAME] The file to hide so changes are not uploaded or included in your WIPs

Subcommands

hf hide clear

hf hide clear [OPTIONS] [FILENAME]

Args

  • [FILENAME]

Options

  • -a, --all

hf hide list

hf hide list