git-nav-upstream.1 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. '\" t
  2. .\" Title: git-nav-upstream
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 05/03/2019
  6. .\" Manual: Chromium depot_tools Manual
  7. .\" Source: depot_tools e58cce6c
  8. .\" Language: English
  9. .\"
  10. .TH "GIT\-NAV\-UPSTREAM" "1" "05/03/2019" "depot_tools e58cce6c" "Chromium depot_tools Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. git-nav-upstream \- Checkout the upstream branch of the currently checked out branch\&.
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit nav\-upstream\fR
  36. .fi
  37. .sp
  38. .SH "DESCRIPTION"
  39. .sp
  40. \fIgit\-nav\-upstream\fR takes the current branch, finds it\*(Aqs upstream branch, and checks that out\&.
  41. .SH "EXAMPLE"
  42. .sp
  43. .sp
  44. .if n \{\
  45. .RS 4
  46. .\}
  47. .nf
  48. \fB$ git map\-branches\fR
  49. origin/master
  50. cool_feature
  51. \fB subfeature *
  52. \fR fixit
  53. frozen_branch
  54. \fB$ git nav\-upstream\fR
  55. Switched to branch \*(Aqcool_feature\*(Aq
  56. Your branch is ahead of \*(Aqorigin/master\*(Aq by 4 commits\&.
  57. (use "git push" to publish your local commits)
  58. \fB$ git map\-branches\fR
  59. origin/master
  60. \fB cool_feature *
  61. \fR subfeature
  62. fixit
  63. frozen_branch
  64. \fB$ git nav\-upstream\fR
  65. Note: switching to \*(Aqorigin/master\*(Aq\&.
  66. You are in \*(Aqdetached HEAD\*(Aq state\&. You can look around, make experimental \fB(1)\fR
  67. changes and commit them, and you can discard any commits you make in this
  68. state without impacting any branches by switching back to a branch\&.
  69. If you want to create a new branch to retain commits you create, you may
  70. do so (now or later) by using \-c with the switch command\&. Example:
  71. git switch \-c <new\-branch\-name>
  72. Or undo this operation with:
  73. git switch \-
  74. Turn off this advice by setting config variable advice\&.detachedHead to false
  75. HEAD is now at beec6f4 Make ReflectorImpl use mailboxes
  76. \fB$ git map\-branches\fR
  77. \fBorigin/master
  78. \fR cool_feature
  79. subfeature
  80. fixit
  81. frozen_branch
  82. .fi
  83. .if n \{\
  84. .RE
  85. .\}
  86. .sp
  87. 1\&. Note that being in a \fIdetached HEAD\fR state is OK\&. You\(cqll just want to create a \fBgit-new-branch\fR(1) from here\&.
  88. .SH "SUGGESTED ALIASES"
  89. .sp
  90. Some common short\-hand aliases\&. Feel free to add these to your \fI~/\&.gitconfig\fR file\&.
  91. .sp
  92. .if n \{\
  93. .RS 4
  94. .\}
  95. .nf
  96. [alias]
  97. git up = nav\-upstream
  98. .fi
  99. .if n \{\
  100. .RE
  101. .\}
  102. .sp
  103. .SH "SEE ALSO"
  104. .sp
  105. \fBgit-map-branches\fR(1), \fBgit-nav-downstream\fR(1)
  106. .SH "CHROMIUM DEPOT_TOOLS"
  107. .sp
  108. Part of the chromium \fBdepot_tools\fR(7) suite\&. These tools are meant to assist with the development of chromium and related projects\&. Download the tools from \m[blue]\fBhere\fR\m[]\&\s-2\u[1]\d\s+2\&.
  109. .SH "NOTES"
  110. .IP " 1." 4
  111. here
  112. .RS 4
  113. \%https://chromium.googlesource.com/chromium/tools/depot_tools.git
  114. .RE