Skip to content

Commit

Permalink
Merge branch 'main' into prettier-yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chiedo authored Nov 17, 2020
2 parents 92740f6 + be16b0f commit 2546f14
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 33 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/help/desktop/gear-diff-select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion content/actions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ versions:
<h2 class="mb-2 font-mktg h1">Code examples</h2>

<div class="pr-lg-3 mb-5 mt-3">
<input class="js-code-example-filter input-lg py-2 px-3 col-12 col-lg-8 form-control" placeholder="Search code examples" type="text" autocomplete="off" />
<input class="js-code-example-filter input-lg py-2 px-3 col-12 col-lg-8 form-control" placeholder="Search code examples" type="search" autocomplete="off" aria-label="Search code examples"/>
</div>

<div class="d-flex flex-wrap gutter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,48 +35,51 @@ As you make changes to files in your text editor and save them locally, you will

#### Creating a partial commit

If one file contains multiple changes, but you only want *some* of those changes to be included in a commit, you can create a partial commit. The rest of your changes will remain intact, so that you can make additional modifications and commits. This allows you to make separate, meaningful commits, such as keeping line break changes in a commit separate from code or prose changes.
If one file contains multiple changes, but you only want some of those changes to be included in a commit, you can create a partial commit. The rest of your changes will remain intact, so that you can make additional modifications and commits. This allows you to make separate, meaningful commits, such as keeping line break changes in a commit separate from code or prose changes.

When you review the diff of the file, the lines that will be included in the commit are highlighted in blue. To exclude the change, click the changed line so the blue disappears.
{% note %}

**Note:** Split diff displays are currently in beta and subject to change.

{% endnote %}

![Unselected lines in a file](/assets/images/help/desktop/partial-commit.png)
1. To choose how your changes are displayed, in the top-right corner of the changed file, use {% octicon "gear" aria-label="The Gear icon" %} to select **Unified** or **Split**.
![Gear icon with unified and split diffs](/assets/images/help/desktop/gear-diff-select.png)
2. To exclude changed lines from your commit, click one or more changed lines so the blue disappears. The lines that are still highlighted in blue will be included in the commit.
![Unselected lines in a file](/assets/images/help/desktop/partial-commit.png)

#### Discarding changes
### 3. Discarding changes
If you have uncommitted changes that you don't want to keep, you can discard the changes. This will remove the changes from the files on your computer. You can discard all uncommitted changes in one or more files, or you can discard specific lines you added.

You can discard all the uncommitted changes in one file, a range of files, or discard all changes in all files since the last commit.
Discarded changes are saved in a dated file in the Trash. You can recover discarded changes until the Trash is emptied.

{% mac %}
#### Discarding changes in one or more files

{% data reusables.desktop.select-discard-files %}
{% data reusables.desktop.click-discard-files %}
![Discard Changes option in context menu](/assets/images/help/desktop/discard-changes-mac.png)
{% data reusables.desktop.confirm-discard-files %}
![Discard Changes button in the confirmation dialog](/assets/images/help/desktop/discard-changes-confirm-mac.png)

{% tip %}
#### Discarding changes in one or more lines
You can discard one or more changed lines that are uncommitted.

**Tip:** The changes you discarded are saved in a dated file in the Trash and you can recover them until the Trash is emptied.

{% endtip %}
{% note %}

{% endmac %}
**Note:** Discarding single lines is disabled in a group of changes that adds and removes lines.

{% windows %}
{% endnote %}

{% data reusables.desktop.select-discard-files %}{% data reusables.desktop.click-discard-files %}
![Discard Changes option in context menu](/assets/images/help/desktop/discard-changes-win.png)
{% data reusables.desktop.confirm-discard-files %}
![Discard Changes button in the confirmation dialog](/assets/images/help/desktop/discard-changes-confirm-win.png)
To discard one added line, in the list of changed lines, right click on the line you want to discard and select **Discard added line**.

{% tip %}
![Discard single line in the confirmation dialog](/assets/images/help/desktop/discard-single-line.png)

**Tip:** The changes you discarded are saved in a file in the Recycle Bin and you can recover them until it is emptied.
To discard a group of changed lines, right click the vertical bar to the right of the line numbers for the lines you want to discard, then select **Discard added lines**.

{% endtip %}
![Discard a group of added lines in the confirmation dialog](/assets/images/help/desktop/discard-multiple-lines.png)

{% endwindows %}

### 3. Write a commit message and push your changes
### 4. Write a commit message and push your changes

Once you're satisfied with the changes you've chosen to include in your commit, write your commit message and push your changes. If you've collaborated on a commit, you can also attribute a commit to more than one author.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ For more information, see "[Setting your commit email address](/articles/setting

### Creating co-authored commits using {% data variables.product.prodname_desktop %}

You can use {% data variables.product.prodname_desktop %} to create a commit with a co-author. For more information, see "[Write a commit message and push your changes](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#3-write-a-commit-message-and-push-your-changes)" and [{% data variables.product.prodname_desktop %}](https://desktop.github.com).
You can use {% data variables.product.prodname_desktop %} to create a commit with a co-author. For more information, see "[Write a commit message and push your changes](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#4-write-a-commit-message-and-push-your-changes)" and [{% data variables.product.prodname_desktop %}](https://desktop.github.com).

![Add a co-author to the commit message](/assets/images/help/desktop/co-authors-demo-hq.gif)

Expand Down Expand Up @@ -75,4 +75,4 @@ The new commit and message will appear on {% data variables.product.product_loca
- "[Viewing a summary of repository activity](/articles/viewing-a-summary-of-repository-activity)"
- "[Viewing a project's contributors](/articles/viewing-a-projects-contributors)"
- "[Changing a commit message](/articles/changing-a-commit-message)"
- "[Committing and reviewing changes to your project](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#3-write-a-commit-message-and-push-your-changes)" in the {% data variables.product.prodname_desktop %} documentation
- "[Committing and reviewing changes to your project](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project#4-write-a-commit-message-and-push-your-changes)" in the {% data variables.product.prodname_desktop %} documentation
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ For more information, see the workflow extract in "[Automatic build for a compil
* Building using a distributed build system external to GitHub Actions, using a daemon process.
* {% data variables.product.prodname_codeql %} isn't aware of the specific compiler you are using.

For C# projects using either `dotnet build` or `msbuild` which target .NET Core 2, you should specify `/p:UseSharedCompilation=false` in your workflow's `run` step, when you build your code. The `UseSharedCompilation` flag isn't necessary for .NET Core 3.0 and later.
For .NET Framework projects, and for C# projects using either `dotnet build` or `msbuild` that target .NET Core 2, you should specify `/p:UseSharedCompilation=false` in your workflow's `run` step, when you build your code. The `UseSharedCompilation` flag isn't necessary for .NET Core 3.0 and later.

For example, the following configuration for C# will pass the flag during the first build step.

Expand Down
10 changes: 8 additions & 2 deletions content/rest/reference/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,21 @@ Each endpoint in the Search API uses [query parameters](https://en.wikipedia.org
A query can contain any combination of search qualifiers supported on {% data variables.product.product_name %}. The format of the search query is:

```
q=SEARCH_KEYWORD_1+SEARCH_KEYWORD_N+QUALIFIER_1+QUALIFIER_N
SEARCH_KEYWORD_1 SEARCH_KEYWORD_N QUALIFIER_1 QUALIFIER_N
```

For example, if you wanted to search for all _repositories_ owned by `defunkt` that
contained the word `GitHub` and `Octocat` in the README file, you would use the
following query with the _search repositories_ endpoint:

```
q=GitHub+Octocat+in:readme+user:defunkt
GitHub Octocat in:readme user:defunkt
```

**Note:** Be sure to use your language's preferred HTML-encoder to construct your query strings. For example:
```javascript
// JavaScript
const queryString = 'q=' + encodeURIComponent('GitHub Octocat in:readme user:defunkt');
```

See "[Searching on GitHub](/articles/searching-on-github/)"
Expand Down
11 changes: 5 additions & 6 deletions includes/small-footer.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<footer class="py-6 text-small">
<div class="container-xl d-flex px-3 px-md-6">
<div class="d-flex text-gray mr-3">
{% octicon "mark-github" height="20" class="mr-3" %}
<span>{{ "now" | date: "%Y" }} GitHub, Inc.</span>
</div>

<ul class="d-flex list-style-none">
<ul class="d-flex list-style-none flex-wrap flex-justify-center flex-xl-justify-start">
<li class="d-flex mr-xl-3 text-gray">
{% octicon "mark-github" height="20" class="mr-2 mr-xl-3" %}
<span>{{ "now" | date: "%Y" }} GitHub, Inc.</span>
</li>
<li class="ml-3"><a href="/github/site-policy/github-terms-of-service">{% data ui.footer.terms %} </a></li>
<li class="ml-3"><a href="/github/site-policy/github-privacy-statement">{% data ui.footer.privacy %} </a></li>
<li class="ml-3"><a href="https://github.com/security">{% data ui.footer.product.links.security %}</a></li>
Expand Down

0 comments on commit 2546f14

Please sign in to comment.