File: git-nav-upstream.1

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (126 lines) | stat: -rw-r--r-- 3,618 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
'\" t
.\"     Title: git-nav-upstream
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 05/07/2025
.\"    Manual: Chromium depot_tools Manual
.\"    Source: depot_tools fab0a429
.\"  Language: English
.\"
.TH "GIT\-NAV\-UPSTREAM" "1" "05/07/2025" "depot_tools fab0a429" "Chromium depot_tools Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-nav-upstream \- Checkout the upstream branch of the currently checked out branch\&.
.SH "SYNOPSIS"
.sp
.nf
\fIgit nav\-upstream\fR
.fi
.sp
.SH "DESCRIPTION"
.sp
\fIgit\-nav\-upstream\fR takes the current branch, finds it\*(Aqs upstream branch, and checks that out\&.
.SH "EXAMPLE"
.sp

.sp
.if n \{\
.RS 4
.\}
.nf
\fB$ git map\-branches\fR
origin/main
  cool_feature
\fB    subfeature *
\fR  fixit
    frozen_branch

\fB$ git nav\-upstream\fR
Switched to branch \*(Aqcool_feature\*(Aq
Your branch is ahead of \*(Aqorigin/main\*(Aq by 4 commits\&.
  (use "git push" to publish your local commits)

\fB$ git map\-branches\fR
origin/main
\fB  cool_feature *
\fR    subfeature
  fixit
    frozen_branch

\fB$ git nav\-upstream\fR
Note: switching to \*(Aqorigin/main\*(Aq\&.

You are in \*(Aqdetached HEAD\*(Aq state\&. You can look around, make experimental  \fB(1)\fR
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch\&.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using \-c with the switch command\&. Example:

  git switch \-c <new\-branch\-name>

Or undo this operation with:

  git switch \-

Turn off this advice by setting config variable advice\&.detachedHead to false

HEAD is now at beec6f4 Make ReflectorImpl use mailboxes

\fB$ git map\-branches\fR
\fBorigin/main
\fR  cool_feature
    subfeature
  fixit
    frozen_branch
.fi
.if n \{\
.RE
.\}
.sp
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\&.
.SH "SUGGESTED ALIASES"
.sp
Some common short\-hand aliases\&. Feel free to add these to your \fI~/\&.gitconfig\fR file\&.
.sp
.if n \{\
.RS 4
.\}
.nf
[alias]
  up = nav\-upstream
.fi
.if n \{\
.RE
.\}
.sp
.SH "SEE ALSO"
.sp
\fBgit-map-branches\fR(1), \fBgit-nav-downstream\fR(1)
.SH "CHROMIUM DEPOT_TOOLS"
.sp
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 by checking out the \m[blue]\fBgit repository\fR\m[]\&\s-2\u[1]\d\s+2\&.
.SH "NOTES"
.IP " 1." 4
git repository
.RS 4
\%https://chromium.googlesource.com/chromium/tools/depot_tools.git
.RE