Skip to main content
6 of 6
Changed -f to --force. Added that new-tip-commit can be a branch name.
Nathan
  • 8.6k
  • 9
  • 52
  • 80
git branch --force <branch-name> [<new-tip-commit>]

If new-tip-commit is omitted, it defaults to the current commit.

new-tip-commit can be a branch name (e.g., master, origin/master).

Chris Johnsen
  • 221.5k
  • 26
  • 212
  • 187