Skip to content

Commit

Permalink
Deploying to gh-pages from @ eab97b5 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoss committed Feb 28, 2024
1 parent 63ac3bc commit 10c4163
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion collaborating/sharing-a-branch/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ <h1 id="sharing-a-branch">Sharing a branch<a class="headerlink" href="#sharing-a
</li>
<li>
<p>Push this branch to your remote repository:</p>
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>push<span class="w"> </span>-u<span class="w"> </span>origin
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>push<span class="w"> </span>-u<span class="w"> </span>origin<span class="w"> </span>collab/jamie
</code></pre></div>
</li>
<li>
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion using-git/how-to-use-branches/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,7 @@ <h2 id="creating-a-new-branch">Creating a new branch<a class="headerlink" href="
git<span class="w"> </span>checkout<span class="w"> </span>-b<span class="w"> </span>my-new-branch<span class="w"> </span>my-other-branch<span class="w"> </span><span class="c1"># From an existing branch</span>
</code></pre></div>
<p>You can then create a corresponding <strong>upstream branch</strong> in your remote repository (in this example, called "origin") by running:</p>
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>push<span class="w"> </span>-u<span class="w"> </span>origin
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>push<span class="w"> </span>-u<span class="w"> </span>origin<span class="w"> </span>my-new-branch
</code></pre></div>
<h2 id="working-on-a-remote-branch">Working on a remote branch<a class="headerlink" href="#working-on-a-remote-branch" title="Permanent link">&para;</a></h2>
<p>If there is a branch in your remote repository that you want to work on, you can make a local copy by running:</p>
Expand Down
8 changes: 6 additions & 2 deletions using-git/pushing-and-pulling-commits/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,11 @@ <h2 id="pushing-your-first-commit-to-a-remote-repository">Pushing your first com
<p>This is a good time to create a <code>README.md</code> file and write a brief description of what this repository will contain.</p>
</div>
<p>Once you have at least one commit in your local repository, you can create a corresponding <strong>upstream branch</strong> in the remote repository with the following command:</p>
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>push<span class="w"> </span>-u<span class="w"> </span>origin
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>push<span class="w"> </span>-u<span class="w"> </span>origin<span class="w"> </span>&lt;branch-name&gt;
</code></pre></div>
<p>The default branch will probably be called <code>"main"</code> or <code>"master"</code>, depending on your <a href="../first-time-git-setup/">Git settings</a>.
You can identify the branch name by running:</p>
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>branch
</code></pre></div>
<div class="admonition note">
<p class="admonition-title">Note</p>
Expand All @@ -2063,7 +2067,7 @@ <h2 id="pushing-your-first-commit-to-a-remote-repository">Pushing your first com
<p>and pull commits by running:</p>
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>pull
</code></pre></div>
<p>without having to specify the remote repository.</p>
<p>without having to specify the remote repository or branch name.</p>
<h2 id="forcing-updates-to-a-remote-repository">Forcing updates to a remote repository<a class="headerlink" href="#forcing-updates-to-a-remote-repository" title="Permanent link">&para;</a></h2>
<p>By default, Git will refuse to push commits from a local branch to a remote branch if the remote branch contains any commits that are not in your local branch.
This situation <strong>should not arise</strong> in general, and typically indicates that either someone else has pushed new commits to the remote branch (see the <a href="../../collaborating/">Collaborating</a> section) or that you have altered the history of your local branch.</p>
Expand Down

0 comments on commit 10c4163

Please sign in to comment.