git_checkout.go 1016 B

123456789101112131415161718192021222324252627282930
  1. package git
  2. import (
  3. "fmt"
  4. "github.com/docopt/docopt-go"
  5. )
  6. func main() {
  7. usage := `usage: git checkout [options] <branch>
  8. git checkout [options] <branch> -- <file>...
  9. options:
  10. -q, --quiet suppress progress reporting
  11. -b <branch> create and checkout a new branch
  12. -B <branch> create/reset and checkout a branch
  13. -l create reflog for new branch
  14. -t, --track set upstream info for new branch
  15. --orphan <new branch>
  16. new unparented branch
  17. -2, --ours checkout our version for unmerged files
  18. -3, --theirs checkout their version for unmerged files
  19. -f, --force force checkout (throw away local modifications)
  20. -m, --merge perform a 3-way merge with the new branch
  21. --conflict <style> conflict style (merge or diff3)
  22. -p, --patch select hunks interactively
  23. `
  24. args, _ := docopt.Parse(usage, nil, true, "", false)
  25. fmt.Println(args)
  26. }