diff --git a/assets/images/enterprise/repository/blame-button.png b/assets/images/enterprise/repository/blame-button.png new file mode 100644 index 0000000000..c85abf3c96 Binary files /dev/null and b/assets/images/enterprise/repository/blame-button.png differ diff --git a/assets/images/enterprise/repository/edit-file-edit-button.png b/assets/images/enterprise/repository/edit-file-edit-button.png new file mode 100644 index 0000000000..af6fe2bac0 Binary files /dev/null and b/assets/images/enterprise/repository/edit-file-edit-button.png differ diff --git a/assets/images/enterprise/repository/edit-readme-preview-changes.png b/assets/images/enterprise/repository/edit-readme-preview-changes.png new file mode 100644 index 0000000000..2ffbb4f120 Binary files /dev/null and b/assets/images/enterprise/repository/edit-readme-preview-changes.png differ diff --git a/assets/images/enterprise/repository/git-blame.png b/assets/images/enterprise/repository/git-blame.png new file mode 100644 index 0000000000..6b0b20a0b3 Binary files /dev/null and b/assets/images/enterprise/repository/git-blame.png differ diff --git a/assets/images/enterprise/repository/new-file-preview.png b/assets/images/enterprise/repository/new-file-preview.png new file mode 100644 index 0000000000..6e6008acc0 Binary files /dev/null and b/assets/images/enterprise/repository/new-file-preview.png differ diff --git a/assets/images/enterprise/repository/raw-file-button.png b/assets/images/enterprise/repository/raw-file-button.png new file mode 100644 index 0000000000..3a84eaf6c9 Binary files /dev/null and b/assets/images/enterprise/repository/raw-file-button.png differ diff --git a/assets/images/help/branches/branch-selection-dropdown.png b/assets/images/help/branches/branch-selection-dropdown.png index 33fb446fb6..99bd9ae7ae 100644 Binary files a/assets/images/help/branches/branch-selection-dropdown.png and b/assets/images/help/branches/branch-selection-dropdown.png differ diff --git a/assets/images/help/branches/file-tree-view-branch-dropdown.png b/assets/images/help/branches/file-tree-view-branch-dropdown.png new file mode 100644 index 0000000000..195f47e278 Binary files /dev/null and b/assets/images/help/branches/file-tree-view-branch-dropdown.png differ diff --git a/assets/images/help/repository/add-files-buttons.png b/assets/images/help/repository/add-files-buttons.png new file mode 100644 index 0000000000..59859ce17d Binary files /dev/null and b/assets/images/help/repository/add-files-buttons.png differ diff --git a/assets/images/help/repository/delete-file-button.png b/assets/images/help/repository/delete-file-button.png new file mode 100644 index 0000000000..fd6a43b46b Binary files /dev/null and b/assets/images/help/repository/delete-file-button.png differ diff --git a/assets/images/help/repository/file-tree-view-branch-dropdown-expanded.png b/assets/images/help/repository/file-tree-view-branch-dropdown-expanded.png new file mode 100644 index 0000000000..2f334c4eb7 Binary files /dev/null and b/assets/images/help/repository/file-tree-view-branch-dropdown-expanded.png differ diff --git a/assets/images/help/repository/fork_button.png b/assets/images/help/repository/fork_button.png index f4190488b6..c8fb42e0f4 100644 Binary files a/assets/images/help/repository/fork_button.png and b/assets/images/help/repository/fork_button.png differ diff --git a/assets/images/help/repository/https-url-clone-cli.png b/assets/images/help/repository/https-url-clone-cli.png index 2a57eb0637..8c245d429b 100644 Binary files a/assets/images/help/repository/https-url-clone-cli.png and b/assets/images/help/repository/https-url-clone-cli.png differ diff --git a/assets/images/help/repository/new-branch.png b/assets/images/help/repository/new-branch.png index 38c1462e07..6f6932c6cb 100644 Binary files a/assets/images/help/repository/new-branch.png and b/assets/images/help/repository/new-branch.png differ diff --git a/assets/images/help/repository/upload-files-button.png b/assets/images/help/repository/upload-files-button.png index 53680709b4..a4371a54ad 100644 Binary files a/assets/images/help/repository/upload-files-button.png and b/assets/images/help/repository/upload-files-button.png differ diff --git a/content/get-started/learning-about-github/github-language-support.md b/content/get-started/learning-about-github/github-language-support.md index fd2920deca..acd3491e1e 100644 --- a/content/get-started/learning-about-github/github-language-support.md +++ b/content/get-started/learning-about-github/github-language-support.md @@ -16,7 +16,7 @@ redirect_from: ## About supported languages -Most {% data variables.product.prodname_dotcom %} features work regardless of which languages your code is written in. You can search for code or enable syntax highlighting based on any language known to {% data variables.product.prodname_dotcom %}. For more information, see "[AUTOTITLE](/search-github/searching-on-github/searching-code#search-by-language)" or "[AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting)." +Most {% data variables.product.prodname_dotcom %} features work regardless of which languages your code is written in. You can search for code or enable syntax highlighting based on any language known to {% data variables.product.prodname_dotcom %}. For more information, see "[AUTOTITLE]{% ifversion code-search-code-view %}(/search-github/github-code-search/understanding-github-code-search-syntax#language-qualifier){% else %}(/search-github/searching-on-github/searching-code#search-by-language){% endif %}" or "[AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting)." Some {% data variables.product.prodname_dotcom %} products have features that are currently only supported for a subset of programming languages. diff --git a/content/get-started/quickstart/contributing-to-projects.md b/content/get-started/quickstart/contributing-to-projects.md index f5d4262aa7..8f6484c5e3 100644 --- a/content/get-started/quickstart/contributing-to-projects.md +++ b/content/get-started/quickstart/contributing-to-projects.md @@ -27,17 +27,17 @@ You can contribute by submitting pull requests from your fork to the upstream re This tutorial uses [the Spoon-Knife project](https://github.com/octocat/Spoon-Knife), a test repository that's hosted on {% data variables.product.prodname_dotcom_the_website %} that lets you test the fork and pull request workflow. 1. Navigate to the `Spoon-Knife` project at https://github.com/octocat/Spoon-Knife. -1. Click **Fork**. - - ![Screenshot of the main page of repository. A button, labeled with a fork icon and "Fork 59.3k," is outlined in dark orange.](/assets/images/help/repository/fork_button.png) +1. In the top-right corner of the page, click **Fork**. + + ![Screenshot of the main page of repository. A button, labeled with a fork icon and "Fork 59.3k," is outlined in dark orange.](/assets/images/help/repository/fork_button.png) {%- ifversion fpt or ghec or ghes > 3.5 or ghae > 3.5 %} 1. Under "Owner," select the dropdown menu and click an owner for the forked repository. -1. By default, forks are named the same as their upstream repositories. Optionally, to further distinguish your fork, in the "Repository name" field, type a name. -1. Optionally, in the "Description" field, type a description of your fork. -1. Optionally, select **Copy the DEFAULT branch only**. +2. By default, forks are named the same as their upstream repositories. Optionally, to further distinguish your fork, in the "Repository name" field, type a name. +3. Optionally, in the "Description" field, type a description of your fork. +4. Optionally, select **Copy the DEFAULT branch only**. For many forking scenarios, such as contributing to open-source projects, you only need to copy the default branch. If you do not select this option, all branches will be copied into the new fork. -1. Click **Create fork**. +5. Click **Create fork**. {% note %} diff --git a/content/get-started/quickstart/create-a-repo.md b/content/get-started/quickstart/create-a-repo.md index cf336c4d33..988ad6a544 100644 --- a/content/get-started/quickstart/create-a-repo.md +++ b/content/get-started/quickstart/create-a-repo.md @@ -79,10 +79,10 @@ When you created your new repository, you initialized it with a *README* file. * Let's commit a change to the README file. 1. In your repository's list of files, select **README.md**. - + ![Screenshot of a list of files in a repository. A file name, "README.md", is highlighted with an orange outline.](/assets/images/help/repository/create-commit-open-readme.png) {% data reusables.repositories.edit-file-button %} -3. In the text box, type some information about yourself. +1. In the text box, type some information about yourself. {% data reusables.files.preview_change %} 1. Review the changes you made to the file. If you select **Show diff**, you will see the new content in green. diff --git a/content/get-started/quickstart/fork-a-repo.md b/content/get-started/quickstart/fork-a-repo.md index 5ac0b5824c..47655f1af0 100644 --- a/content/get-started/quickstart/fork-a-repo.md +++ b/content/get-started/quickstart/fork-a-repo.md @@ -57,12 +57,12 @@ You might fork a project to propose changes to the upstream repository. In this 1. On {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% else %}{% data variables.location.product_location %}{% endif %}, navigate to the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. 1. In the top-right corner of the page, click **Fork**. - + ![Screenshot of the main page of repository. A button, labeled with a fork icon and "Fork 59.3k," is outlined in dark orange.](/assets/images/help/repository/fork_button.png) {%- ifversion fpt or ghec or ghes > 3.5 or ghae > 3.5 %} 1. Under "Owner," select the dropdown menu and click an owner for the forked repository. -1. By default, forks are named the same as their upstream repositories. Optionally, to further distinguish your fork, in the "Repository name" field, type a name. -1. Optionally, in the "Description" field, type a description of your fork. +2. By default, forks are named the same as their upstream repositories. Optionally, to further distinguish your fork, in the "Repository name" field, type a name. +3. Optionally, in the "Description" field, type a description of your fork. {%- ifversion fpt or ghec or ghes > 3.6 or ghae > 3.6 %} 1. Optionally, select **Copy the DEFAULT branch only**. diff --git a/content/get-started/quickstart/hello-world.md b/content/get-started/quickstart/hello-world.md index 29c47788ef..803f4fa8c7 100644 --- a/content/get-started/quickstart/hello-world.md +++ b/content/get-started/quickstart/hello-world.md @@ -69,14 +69,13 @@ Here at {% data variables.product.product_name %}, our developers, writers, and ### Create a branch 1. Click the **Code** tab of your `hello-world` repository. -1. Above the file list, click the dropdown menu that says **main**. - +2. Above the file list, click the dropdown menu that says **main**. ![Screenshot of the repository page. A dropdown menu, labeled with a branch icon and "main", is highlighted with an orange outline.](/assets/images/help/branches/branch-selection-dropdown.png) -1. Type a branch name, `readme-edits`, into the text box. -1. Click **Create branch: readme-edits from main**. +3. Type a branch name, `readme-edits`, into the text box. +4. Click **Create branch: readme-edits from main**. + ![Screenshot of the branch dropdown for a repository. "Create branch: readme-edits from 'main'" is outlined in dark orange.](/assets/images/help/repository/new-branch.png) - Now you have two branches, `main` and `readme-edits`. Right now, they look exactly the same. Next you'll add changes to the new branch. ## Making and committing changes @@ -88,8 +87,14 @@ You can make and save changes to the files in your repository. On {% data variab 1. Under the `readme-edits` branch you created, click the _README.md_ file. 1. To edit the file, click {% octicon "pencil" aria-label="Edit file" %}. 1. In the editor, write a bit about yourself. Try using different Markdown elements. +{% ifversion code-search-code-view %} +1. Click **Commit changes...**. +1. In the "Propose changes" box, write a commit message that describes your changes. +1. Click **Propose changes**. +{% else %} 1. In the "Commit changes" box, write a commit message that describes your changes. 1. Click **Commit changes**. +{% endif %} These changes will be made only to the README file on your `readme-edits` branch, so now this branch contains content that's different from `main`. diff --git a/content/get-started/using-github/keyboard-shortcuts.md b/content/get-started/using-github/keyboard-shortcuts.md index 2b5150a1ba..b4d4510894 100644 --- a/content/get-started/using-github/keyboard-shortcuts.md +++ b/content/get-started/using-github/keyboard-shortcuts.md @@ -85,6 +85,19 @@ For more keyboard shortcuts, see the [CodeMirror documentation](https://codemirr |A | Show or hide annotations on diffs |B | Open blame view. For more information, see "[AUTOTITLE](/repositories/working-with-files/using-files/viewing-a-file)." +{% ifversion code-search-code-view %} + +## Navigating within code files + +If you view a code file in a repository using the **Code** view and click on any line in the file, you will see a cursor. You can then navigate within the content of the file, also known as a blob (binary large object), using keyboard shortcuts. + +| Keyboard shortcut | Description +|-----------|------------ +|Shift+J| Highlights the line that is currently selected by the cursor within the code file +|Shift+F10 | If a line of code is currently selected, this shortcut opens the line menu for that line, appearing under {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} to the left of the line +|Command+Enter (Mac) or
Control+Enter (Windows/Linux) | Highlights the code symbol currently selected by the cursor and all other occurences of the symbol in the code, and shows the symbol in the symbols pane +{% endif %} + ## Comments | Keyboard shortcut | Description diff --git a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md index a0f364ccf5..cdf118708e 100644 --- a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md +++ b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md @@ -44,7 +44,7 @@ You can pin gists to your profile so other people can see them easily. For more {% endif %} -You can discover {% ifversion ghae %}internal{% else %}public{% endif %} gists others have created by going to the {% data variables.gists.gist_homepage %} and clicking **All Gists**. This will take you to a page of all gists sorted and displayed by time of creation or update. You can also search gists by language with {% data variables.gists.gist_search_url %}. Gist search uses the same search syntax as [code search](/search-github/searching-on-github/searching-code). +You can discover {% ifversion ghae %}internal{% else %}public{% endif %} gists others have created by going to the {% data variables.gists.gist_homepage %} and clicking **All Gists**. This will take you to a page of all gists sorted and displayed by time of creation or update. You can also search gists by language with {% data variables.gists.gist_search_url %}. {% ifversion ghes or ghae %}Gist search uses the same search syntax as [code search](/search-github/searching-on-github/searching-code).{% endif %} Since gists are Git repositories, you can view their full commit history, complete with diffs. You can also fork or clone gists. For more information, see "[AUTOTITLE](/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists)." diff --git a/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md b/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md index 895f00977d..a29ec9b6ce 100644 --- a/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md +++ b/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md @@ -41,10 +41,16 @@ You can create a branch in different ways on {% data variables.product.product_n ### Creating a branch using the branch dropdown {% data reusables.repositories.navigate-to-repo %} +{% ifversion code-search-code-view %} +1. Select the {% octicon "git-branch" aria-hidden="true" %} branch dropdown menu, in the file tree view or at the top of the integrated file editor. + + ![Screenshot of the file tree view for a repository. A dropdown menu for branches is outlined in dark orange.](/assets/images/help/branches/file-tree-view-branch-dropdown.png) +{% else %} 1. Select the branch selector dropdown menu. ![Screenshot of the repository page. A dropdown menu, labeled with a branch icon and "main", is highlighted with an orange outline.](/assets/images/help/branches/branch-selection-dropdown.png) -1. Optionally, if you want to create the new branch from a branch other than the default branch of the repository, click another branch, then select the branch selector dropdown menu again. +{% endif %} +1. Optionally, if you want to create the new branch from a branch other than the default branch of the repository, click another branch, then select the branch dropdown menu again. 1. In the "Find or create a branch..." text field, type a unique name for your new branch, then click **Create branch**. ![Screenshot of the branch selector dropdown menu. "Create branch: new-branch" is highlighted with an orange outline.](/assets/images/help/branches/create-branch-text.png) diff --git a/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/viewing-branches-in-your-repository.md b/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/viewing-branches-in-your-repository.md index ece89c408a..d87d2fcb27 100644 --- a/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/viewing-branches-in-your-repository.md +++ b/content/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/viewing-branches-in-your-repository.md @@ -16,13 +16,13 @@ shortTitle: View branches --- {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.navigate-to-branches %} -3. Use the navigation at the top of the page to view specific lists of branches: +1. Use the navigation at the top of the page to view specific lists of branches: - **Your branches**: In repositories that you have push access to, the **Yours** view shows all branches that you’ve pushed to, excluding the default branch, with the most recent branches first. - **Active branches**: The **Active** view shows all branches that anyone has committed to within the last three months, ordered by the branches with the most recent commits first. - **Stale branches**: The **Stale** view shows all branches that no one has committed to in the last three months, ordered by the branches with the oldest commits first. Use this list to determine [which branches to delete](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository). - **All branches**: The **All** view shows the default branch, followed by all other branches ordered by the branches with the most recent commits first. -4. Optionally, use the search field on the top right. It provides a simple, case-insensitive, sub-string search on the branch name. It does not support any additional query syntax. +1. Optionally, use the search field on the top right. It provides a simple, case-insensitive, sub-string search on the branch name. It does not support any additional query syntax. ## Further reading diff --git a/content/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template.md b/content/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template.md index e7e8643487..3a2e83ab47 100644 --- a/content/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template.md +++ b/content/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template.md @@ -34,7 +34,6 @@ Creating a repository from a template is similar to forking a repository, but th For more information about forks, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)." ## Creating a repository from a template - {% data reusables.repositories.navigate-to-repo %} 1. Above the file list, click **Use this template**. {% ifversion fpt or ghec %} diff --git a/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md b/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md index 562dd941ab..be05c88ca0 100644 --- a/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md +++ b/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md @@ -33,13 +33,13 @@ Files that you add to a repository via a browser are limited to {% data variable {% endtip %} {% data reusables.repositories.navigate-to-repo %} -1. Above the list of files, select the **Add file** dropdown menu and click **Upload files**. - +1. Above the list of files, select the **Add file** dropdown menu and click **Upload files**. Alternatively, you can drag and drop files into your browser. + ![Screenshot of the main page of the repository. Above the list of a files, a button, labeled "Add file," is outlined in dark orange.](/assets/images/help/repository/upload-files-button.png) 1. To select the files you want to upload, drag and drop the file or folder, or click **choose your files**. {% data reusables.files.commit-message %} {% data reusables.files.choose_commit_branch %} -1. Click **Commit changes**. +1. Click **Propose changes**. ## Adding a file to a repository using the command line diff --git a/content/repositories/working-with-files/managing-files/creating-new-files.md b/content/repositories/working-with-files/managing-files/creating-new-files.md index 7bdefd88c8..691ae26a61 100644 --- a/content/repositories/working-with-files/managing-files/creating-new-files.md +++ b/content/repositories/working-with-files/managing-files/creating-new-files.md @@ -26,8 +26,11 @@ When creating a file on {% data variables.product.product_name %}, consider the 1. In the file name field, type the name and extension for the file. To create subdirectories, type the `/` directory separator. 1. In the file contents text box, type content for the file. 1. To review the new content, above the file contents, click **Preview**. - - ![Screenshot of a file in edit mode. Above the text box for editing file contents, a tab, labeled "Preview", outlined in dark orange.](/assets/images/help/repository/new-file-preview.png) +{% ifversion code-search-code-view %} + ![Screenshot of a file in edit mode. Above the text box for editing file contents, a tab, labeled "Preview", outlined in dark orange.](/assets/images/help/repository/new-file-preview.png) +{% else %} + ![Screenshot of a file in edit mode. Above the text box for editing file contents, a tab, labeled "Preview", outlined in dark orange.](/assets/images/enterprise/repository/new-file-preview.png) +{% endif %} {% data reusables.files.write_commit_message %} {% data reusables.files.choose-commit-email %} {% data reusables.files.choose_commit_branch %} diff --git a/content/repositories/working-with-files/managing-files/deleting-files-in-a-repository.md b/content/repositories/working-with-files/managing-files/deleting-files-in-a-repository.md index 875fa98f3b..4d7bccd7f1 100644 --- a/content/repositories/working-with-files/managing-files/deleting-files-in-a-repository.md +++ b/content/repositories/working-with-files/managing-files/deleting-files-in-a-repository.md @@ -28,7 +28,13 @@ If the file{% ifversion fpt or ghes or ghec %} or directory{% endif %} you delet ## Deleting a file 1. Browse to the file in your repository that you want to delete. -1. In the top-right corner, select the {% octicon "kebab-horizontal" aria-label="More options" %} dropdown menu, then click **Delete file**. +{% ifversion code-search-code-view %} +1. In the top-right corner, select the {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} dropdown menu, then click **Delete file**. + + ![Screenshot of the file list for a directory. To the right of the directory name, a button, labeled with a kebab icon, is outlined in dark orange.](/assets/images/help/repository/delete-file-button.png) +{% else %} +1. At the top of the file, click {% octicon "trash" aria-label="The trash icon" %}. +{% endif %} {% data reusables.files.commit-message %} {% data reusables.files.choose-commit-email %} {% data reusables.files.choose_commit_branch %} @@ -39,7 +45,7 @@ If the file{% ifversion fpt or ghes or ghec %} or directory{% endif %} you delet 1. Browse to the directory in your repository that you want to delete. 1. In the top-right corner, select the {% octicon "kebab-horizontal" aria-label="More options" %} dropdown menu, then click **Delete directory**. - + ![Screenshot of the file list for a directory. To the right of the directory name, a button, labeled with a kebab icon, is outlined in dark orange.](/assets/images/help/repository/delete-directory-button.png) 1. Review the files you will delete. {% data reusables.files.commit-message %} diff --git a/content/repositories/working-with-files/managing-files/index.md b/content/repositories/working-with-files/managing-files/index.md index 52c915f056..be66012523 100644 --- a/content/repositories/working-with-files/managing-files/index.md +++ b/content/repositories/working-with-files/managing-files/index.md @@ -20,6 +20,5 @@ children: - /renaming-a-file - /deleting-files-in-a-repository - /customizing-how-changed-files-appear-on-github - - /navigating-files-with-the-new-code-view --- diff --git a/content/repositories/working-with-files/managing-files/moving-a-file-to-a-new-location.md b/content/repositories/working-with-files/managing-files/moving-a-file-to-a-new-location.md index 49f5114786..d968e8c5c3 100644 --- a/content/repositories/working-with-files/managing-files/moving-a-file-to-a-new-location.md +++ b/content/repositories/working-with-files/managing-files/moving-a-file-to-a-new-location.md @@ -32,9 +32,7 @@ In addition to changing the file location, you can also [update the contents of {% endtip %} 1. In your repository, browse to the file you want to move. -1. In the upper right corner of the file view, click {% octicon "pencil" aria-label="Edit file" %} to open the file editor. - - ![Screenshot of a file. In the header, a button, labeled with a pencil icon, is outlined in dark orange.](/assets/images/help/repository/edit-file-edit-button.png) +{% data reusables.repositories.edit-file %} 1. In the filename field, change the name of the file using these guidelines: - To move the file **into a subfolder**, type the name of the folder you want, followed by `/`. Your new folder name becomes a new item in the navigation breadcrumbs. - To move the file into a directory **above the file's current location**, place your cursor at the beginning of the filename field, then either type `../` to jump up one full directory level, or type the `backspace` key to edit the parent folder's name. diff --git a/content/repositories/working-with-files/managing-files/navigating-files-with-the-new-code-view.md b/content/repositories/working-with-files/managing-files/navigating-files-with-the-new-code-view.md deleted file mode 100644 index 8ad1de5802..0000000000 --- a/content/repositories/working-with-files/managing-files/navigating-files-with-the-new-code-view.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Navigating files with the new code view (beta) -intro: 'With the new code view (beta), you can view your code in context with an easily navigable file tree and integrated symbol search.' -allowTitleToDifferFromFilename: true -versions: - feature: file-tree-view -topics: - - Repositories -shortTitle: New code view (beta) ---- - -{% note %} - -**Note**: {% data reusables.search.code-search-code-view-beta-note %} - -{% data reusables.search.code-search-link %} - -{% endnote %} - -## About the new code view (beta) -The new code view beta improves navigation with a file tree view, simplifies file editing, introduces a symbols pane for symbol search and navigation, and updates the blame view to maintain file context. The new code view is integrated with a new code search engine and search interface in a public beta on {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.search.code-search-link %} - -To provide feedback on the new code view beta, see the [discussion forum](https://github.com/orgs/community/discussions/categories/repositories). - -## Enabling and disabling the new code search and code view (beta) - -{% data reusables.search.enabling-and-disabling-code-search-and-view-beta %} - -## Using the file tree view -The new file tree view is a panel that displays a repository's directories and files within an easily navigable tree. You can move between directories and files quickly and understand the context for each item you view. - -1. Select a repository, then click a directory or file within that repository to open the file tree view. -1. To search for a specific directory or file, in the file tree view, click the {% octicon "filter" aria-hidden="true" %} **Jump to file** search bar, then type the directory or file name and select the directory or file from the results. You can view the file path for a directory or file below each search result. - - ![Screenshot of the file tree view for a repository. A search bar, labeled "Jump to file", is outlined in dark orange.](/assets/images/help/repository/file-tree-view-jump-to-file.png) - - - To search within the repository using the {% data variables.product.prodname_dotcom %} search bar, click {% octicon "search" aria-label="The search icon" %} in the file tree view. - -1. To switch between branches, select the {% octicon "git-branch" aria-hidden="true" %} branch dropdown menu, then click the desired branch from the results. To view all branches for a repository, click **View all branches**. - - ![Screenshot of the file tree view for a repository. A dropdown menu for switching branches is expanded and outlined in dark orange.](/assets/images/help/repository/file-tree-view-branch-dropdown.png) - -1. To switch between tags, select the {% octicon "git-branch" aria-hidden="true" %} branch dropdown menu, click the **Tags** tab, then click the desired tag from the results. To view all tags for a repository, click **View all tags**. - - ![Screenshot of the file tree view. A dropdown menu for switching branches is expanded, and a tab, labeled "Tags", is outlined in dark orange.](/assets/images/help/repository/file-tree-view-branch-dropdown-tags.png) - -## Working with files -The new code view also includes updates to the ways in which you work with files. Existing functionality like editing a file, creating or uploading a file, and deleting a file or directory has been streamlined. You now have quick access to editing a file in github.dev or {% data variables.product.prodname_desktop %} and an integrated search-in-file function. - -1. Select a repository, then click a file within that repository to open the new code view. -1. To edit a file in the integrated file editor, click {% octicon "pencil" aria-label="The pencil icon" %}. -1. To edit a file on the {% data variables.codespaces.serverless %} web-based editor or {% data variables.product.prodname_desktop %}, select {% octicon "triangle-down" aria-label="The downwards-facing triangle icon" %} next to {% octicon "pencil" aria-label="The pencil icon" %}, then click either **github.dev** or **{% data variables.product.prodname_desktop %}**. - - {% note %} - - **Note:** The {% data variables.codespaces.serverless %} editor is currently in beta preview. You can provide feedback [in our discussions](https://github.com/community/community/discussions/categories/general). - - {% endnote %} - -1. To find specific characters within a file, view the raw code of the file by clicking the **Code** button. Next, press Command+F (Mac) or Ctrl+F (Windows/Linux) and type the characters you want to find. You can navigate between results by pressing Return (Mac) or Enter (Windows/Linux), or by clicking {% octicon "chevron-down" aria-label="The downwards-facing chevron icon" %} and {% octicon "chevron-up" aria-label="The upwards-facing chevron icon" %}. - - {% note %} - - **Note:** To use your browser's default find function, press Command+F (Mac) or Ctrl+F (Windows/Linux) twice. Be aware that your browser's default find function will not be able to search the entirety of a large file, while the search integrated in the new code view will. - - {% endnote %} - -1. To create a new file in a specific directory, navigate to the chosen directory. Next, select the **Add file** {% octicon "triangle-down" aria-label="The downwards-facing triangle icon" %} dropdown menu, then click {% octicon "plus" aria-label="The plus sign icon" %} **Create new file**. - - Alternatively, you can click {% octicon "plus" aria-label="The plus sign icon" %} in the file tree view. -1. To delete a directory or file, navigate to the directory or file and click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} . Then, click **Delete directory** or **Delete file**. -1. To upload a file, navigate to the chosen directory. Next, select the **Add file** {% octicon "triangle-down" aria-label="The downwards-facing triangle icon" %} dropdown menu, then click {% octicon "upload" aria-label="The upload icon" %} **Upload files**. - - Alternatively, you can drag and drop files into your browser. - -## Using the symbols pane -You can now quickly view and navigate between symbols such as functions or classes in your code with the symbols pane. You can search for a symbol in a single file, in all files in a repository, or even in all public repositories on {% data variables.product.prodname_dotcom %}. - -Symbol search is a feature of the new code search (beta). For more information, see "[AUTOTITLE](/search-github/github-code-search/understanding-github-code-search-syntax#symbol-qualifier)." - -1. Select a repository, then navigate to a file containing symbols. -1. To bring up the symbols pane, above the file content, click {% octicon "code-square" aria-label="The code square icon" %}. - - Alternatively, you can open the symbols pane by clicking an eligible symbol in your file. Clickable symbols are highlighted in yellow when you hover over them. - -1. Click the symbol you would like to find from the symbols pane or within the file itself. - - - To search for a symbol in the repository as a whole, in the symbols pane, click **Search for this symbol in this repository**. To search for a symbol in all repositories on {% data variables.product.prodname_dotcom %}, click **all repositories**. - -1. To navigate between references to a symbol, click {% octicon "chevron-down" aria-label="The downwards-facing chevron icon" %} or {% octicon "chevron-up" aria-label="The upwards-facing chevron icon" %}. -1. To navigate to a specific reference to a symbol, click a result of the symbol search under {% octicon "chevron-down" aria-label="The downwards-facing chevron icon" %} **In this file**. -1. To exit the search for a specific symbol, click {% octicon "arrow-left" aria-label="The left arrow icon" %} **All Symbols**. - -## Using the blame view -Rather than losing file context when you enter the blame view, you can now use the new code view to quickly toggle between the blame view, the raw code view, and the preview for a file (depending on the file type). - -1. Select a repository, then click a file within that repository to open the new code view. -1. To see the revision history of the file, above the file content, click **Blame**. This view gives you a line-by-line revision history, with the code in a file separated by commit. Each commit lists the author, commit description, and commit date. - - To see versions of a file before a particular commit, click {% octicon "versions" aria-label="View blame prior to this change" %}. Alternatively, to see more detail about a particular commit, click the commit message. - - ![Screenshot of a commit in the blame view. The commit message and versions icon are outlined in dark orange.](/assets/images/help/repository/code-view-blame-commit-options.png) - -1. To return to the raw code view, above the file content, click **Code**. - - If you are viewing a Markdown file, above the file content, you can also click **Preview** to return to the view with Markdown formatting applied. - -## Further reading - -- "[AUTOTITLE](/repositories/working-with-files/managing-files/moving-a-file-to-a-new-location)" -- "[AUTOTITLE](/search-github/github-code-search/about-github-code-search)" diff --git a/content/repositories/working-with-files/managing-files/renaming-a-file.md b/content/repositories/working-with-files/managing-files/renaming-a-file.md index 4c86547820..9e315c7933 100644 --- a/content/repositories/working-with-files/managing-files/renaming-a-file.md +++ b/content/repositories/working-with-files/managing-files/renaming-a-file.md @@ -33,7 +33,7 @@ Renaming a file also gives you the opportunity to [move the file to a new locati 1. In your repository, browse to the file you want to rename. {% data reusables.repositories.edit-file-button %} -3. In the filename field, change the name of the file to the new filename you want. You can also update the contents of your file at the same time. {% ifversion fpt or ghec or ghes > 3.8 %} +1. In the filename field, change the name of the file to the new filename you want. You can also update the contents of your file at the same time. {% ifversion fpt or ghec or ghes > 3.8 %} ![Screenshot showing a repository file open for editing in the web browser. The file name field is active and highlighted with a dark orange outline.](/assets/images/help/repository/changing-file-name.png) {% elsif ghes < 3.9 or ghae %} ![Screenshot showing a repository file open for editing in the web browser. The file name field is active and shown in the foreground.](/assets/images/enterprise/repository/changing-file-name.png) {% endif %} {% data reusables.files.write_commit_message %} diff --git a/content/repositories/working-with-files/using-files/downloading-source-code-archives.md b/content/repositories/working-with-files/using-files/downloading-source-code-archives.md index 2033198ea0..1eddb9733f 100644 --- a/content/repositories/working-with-files/using-files/downloading-source-code-archives.md +++ b/content/repositories/working-with-files/using-files/downloading-source-code-archives.md @@ -22,8 +22,8 @@ You can download the source code archives in three ways. {% data reusables.repositories.navigate-to-repo %} 1. Above the list of files, click {% octicon "code" aria-hidden="true" %} **Code**. - - ![Screenshot of the list of files on the landing page of a repository. The "Code" button is highlighted with a dark orange outline.](/assets/images/help/repository/code-button.png) + + ![Screenshot of the list of files on the landing page of a repository. The "Code" button is highlighted with a dark orange outline.](/assets/images/help/repository/code-button.png) 1. Click {% octicon "file-zip" aria-label="The ZIP icon" %} **Download ZIP**. diff --git a/content/repositories/working-with-files/using-files/navigating-code-on-github.md b/content/repositories/working-with-files/using-files/navigating-code-on-github.md index 2602c7701d..1c93b2e500 100644 --- a/content/repositories/working-with-files/using-files/navigating-code-on-github.md +++ b/content/repositories/working-with-files/using-files/navigating-code-on-github.md @@ -49,6 +49,28 @@ To learn more about these approaches, see "[Precise and search-based navigation] Future releases will add *precise code navigation* for more languages, which is a code navigation approach that can give more accurate results. +{% ifversion code-search-code-view %}You can use keyboard shortcuts to navigate within a code file. For more information, see "[AUTOTITLE](/get-started/using-github/keyboard-shortcuts#navigating-within-code-files)."{% endif %} + +{% ifversion code-search-code-view %} +## Using the symbols pane +You can now quickly view and navigate between symbols such as functions or classes in your code with the symbols pane. You can search for a symbol in a single file, in all files in a repository, or even in all public repositories on {% data variables.product.prodname_dotcom %}. + +Symbol search is a feature of code search. For more information, see "[AUTOTITLE](/search-github/github-code-search/understanding-github-code-search-syntax#symbol-qualifier)." + +1. Select a repository, then navigate to a file containing symbols. +1. To bring up the symbols pane, above the file content, click {% octicon "code-square" aria-label="The code square icon" %}. + + Alternatively, you can open the symbols pane by clicking an eligible symbol in your file. Clickable symbols are highlighted in yellow when you hover over them. + +1. Click the symbol you would like to find from the symbols pane or within the file itself. + + - To search for a symbol in the repository as a whole, in the symbols pane, click **Search for this symbol in this repository**. To search for a symbol in all repositories on {% data variables.product.prodname_dotcom %}, click **all repositories**. + +1. To navigate between references to a symbol, click {% octicon "chevron-down" aria-label="The downwards-facing chevron icon" %} or {% octicon "chevron-up" aria-label="The upwards-facing chevron icon" %}. +1. To navigate to a specific reference to a symbol, click a result of the symbol search under {% octicon "chevron-down" aria-label="The downwards-facing chevron icon" %} **In this file**. +1. To exit the search for a specific symbol, click {% octicon "arrow-left" aria-label="The left arrow icon" %} **All Symbols**. +{% endif %} + ## Jumping to the definition of a function or method You can jump to a function or method's definition within the same repository by clicking the function or method call in a file. @@ -84,4 +106,4 @@ If code navigation is enabled for you but you don't see links to the definitions - Code navigation only works for repositories with fewer than 100,000 files. ## Further reading -- "[AUTOTITLE](/search-github/searching-on-github/searching-code)" +- "[AUTOTITLE]{% ifversion code-search-code-view %}(/search-github/github-code-search/about-github-code-search){% else %}(/search-github/searching-on-github/searching-code){% endif %}" diff --git a/content/repositories/working-with-files/using-files/viewing-a-file.md b/content/repositories/working-with-files/using-files/viewing-a-file.md index 3606706216..4e27b4b554 100644 --- a/content/repositories/working-with-files/using-files/viewing-a-file.md +++ b/content/repositories/working-with-files/using-files/viewing-a-file.md @@ -24,9 +24,15 @@ With the raw view, you can view or copy the raw content of a file without any st {% data reusables.repositories.navigate-to-repo %} 1. Click the file that you want to view. 1. In the upper-right corner of the file view, click **Raw**. +{% ifversion code-search-code-view %} + + ![Screenshot of a file. In the header, a button, labeled "Raw," outlined in dark orange.](/assets/images/help/repository/raw-file-button.png) +{% else %} + + ![Screenshot of a file. In the header, a button, labeled "Raw," outlined in dark orange.](/assets/images/enterprise/repository/raw-file-button.png) +{% endif %} +1. Optionally, to copy the raw file content, in the upper-right corner of the file view, click **{% octicon "copy" aria-label="Copy raw content" %}**. {% ifversion code-search-code-view %} To download the raw file, click **{% octicon "download" aria-label="Download raw file" %}**.{% endif %} - ![Screenshot of a file. In the header, a button, labeled "Raw," outlined in dark orange.](/assets/images/help/repository/raw-file-button.png) -1. Optionally, to copy the raw file content, in the upper-right corner of the file view, click **{% octicon "copy" aria-label="Copy raw content" %}**. ## Viewing the line-by-line revision history for a file @@ -40,11 +46,22 @@ Within the blame view, you can view the line-by-line revision history for an ent {% data reusables.repositories.navigate-to-repo %} 1. Click to open the file whose line history you want to view. +{% ifversion code-search-code-view %} +1. Above the file content, click **Blame**. This view gives you a line-by-line revision history, with the code in a file separated by commit. Each commit lists the author, commit description, and commit date. +1. To see versions of a file before a particular commit, click {% octicon "versions" aria-label="View blame prior to this change" %}. Alternatively, to see more detail about a particular commit, click the commit message. + + ![Screenshot of a commit in the blame view. The commit message and versions icon are outlined in dark orange.](/assets/images/help/repository/code-view-blame-commit-options.png) + +1. To return to the raw code view, above the file content, click **Code**. + - If you are viewing a Markdown file, above the file content, you can also click **Preview** to return to the view with Markdown formatting applied. +{% else %} 1. In the upper-right corner of the file view, click **Blame** to open the blame view. -![Screenshot showing the header for a file. The "Blame" button is emphasised.](/assets/images/help/repository/blame-button.png) + + ![Screenshot showing the header for a file. The "Blame" button is emphasized.](/assets/images/enterprise/repository/blame-button.png) 1. To see earlier revisions of a specific line, or reblame, click {% octicon "versions" aria-label="View blame prior to this change" %} until you've found the changes you're interested in viewing. - ![Screenshot of the "Blame" view of a file. To the right of a commit message, the versions icon is outlined in dark orange.](/assets/images/help/repository/git_blame.png) + ![Screenshot of the "Blame" view of a file. To the right of a commit message, the versions icon is outlined in dark orange.](/assets/images/enterprise/repository/git-blame.png) +{% endif %} {% ifversion blame-ignore-revs %} diff --git a/content/search-github/getting-started-with-searching-on-github/about-searching-on-github.md b/content/search-github/getting-started-with-searching-on-github/about-searching-on-github.md index 53465f3bfd..845354b9a6 100644 --- a/content/search-github/getting-started-with-searching-on-github/about-searching-on-github.md +++ b/content/search-github/getting-started-with-searching-on-github/about-searching-on-github.md @@ -19,28 +19,31 @@ topics: - GitHub search --- -{% ifversion github-code-search %} - {% note %} - - **Note:** {% data reusables.search.classic-search-code-search-note %} - - {% endnote %} -{% endif %} +## About searching on {% data variables.product.prodname_dotcom %} {% data reusables.search.you-can-search-globally %} -- To search globally across all of {% data variables.product.product_name %}, type what you're looking for into the search field at the top of any page, and choose "All {% data variables.product.prodname_dotcom %}" in the search drop-down menu. +- To search globally across all of {% data variables.product.product_name %}, type what you're looking for into the search field at the top of any page, and choose "Search all of {% data variables.product.prodname_dotcom %}" in the search dropdown menu. - To search within a particular repository or organization, navigate to the repository or organization page, type what you're looking for into the search field at the top of the page, and press **Enter**. +{% ifversion code-search-code-view %} You can also use suggestions and completions in the search bar to quickly find what you need. + +- If you click on the search bar in the top navigation of GitHub.com, you will see a list of suggestions organized by category, including recent searches and suggested repositories, teams, and projects that you have access to. +- Clicking on any of the specific suggestions will take you directly to the page for that suggestion (for example, the repository or project page). If you click on a recent search, depending on the type of search, the search term will appear in the search bar or you will be taken to the search results page for the search term. +- Once you start typing, you will see a list of completions and suggestions that match your query. You can click on a suggestion to jump to a specific location. As you continue to type, you will see more specific suggestions, such as code files you can jump to directly. + +After typing a search query, you can press **Enter** to go to the full search results view, where you can see each match and a visual interface for applying filters. For more information, see "[Searching using a visual interface](#searching-using-a-visual-interface)." +{% endif %} + {% note %} **Notes:** {% ifversion fpt or ghes or ghec %} - {% data reusables.search.required_login %}{% endif %} -- {% data variables.product.prodname_pages %} sites are not searchable on {% data variables.product.product_name %}. However you can search the source content if it exists in the default branch of a repository, using code search. For more information, see "[AUTOTITLE](/search-github/searching-on-github/searching-code)." For more information about {% data variables.product.prodname_pages %}, see "[AUTOTITLE](/pages/getting-started-with-github-pages/about-github-pages)" -- Currently our search doesn't support exact matching. -- Whenever you are searching in code files, only the first two results in each file will be returned. +- {% data variables.product.prodname_pages %} sites are not searchable on {% data variables.product.product_name %}. However you can search the source content if it exists in the default branch of a repository, using code search. For more information, see "[AUTOTITLE]{% ifversion code-search-code-view %}(/search-github/github-code-search/understanding-github-code-search-syntax){% else %}(/search-github/searching-on-github/searching-code){% endif %}." For more information about {% data variables.product.prodname_pages %}, see "[AUTOTITLE](/pages/getting-started-with-github-pages/about-github-pages)" +- Currently our search doesn't support exact matching.{% ifversion ghes or ghae %} +- Whenever you are searching in code files, only the first two results in each file will be returned.{% endif %} {% endnote %} @@ -56,7 +59,7 @@ You can search for the following information across all repositories you can acc - [Topics](/search-github/searching-on-github/searching-topics) - [Issues and pull requests](/search-github/searching-on-github/searching-issues-and-pull-requests){% ifversion fpt or ghec %} - [Discussions](/search-github/searching-on-github/searching-discussions){% endif %} -- [Code](/search-github/searching-on-github/searching-code) +- {% ifversion code-search-code-view %}[Code](/search-github/github-code-search/understanding-github-code-search-syntax){% else %}[Code](/search-github/searching-on-github/searching-code){% endif %} - [Commits](/search-github/searching-on-github/searching-commits) - [Users](/search-github/searching-on-github/searching-users) - [Packages](/search-github/searching-on-github/searching-for-packages) @@ -64,7 +67,7 @@ You can search for the following information across all repositories you can acc ## Searching using a visual interface -You can search {% data variables.product.product_name %} using the {% data variables.search.search_page_url %} or {% data variables.search.advanced_url %}. {% ifversion command-palette %}Alternatively, you can use the interactive search in the {% data variables.product.prodname_command_palette %} to search your current location in the UI, a specific user, repository or organization, and globally across all of {% data variables.product.product_name %}, without leaving the keyboard. For more information, see "[AUTOTITLE](/get-started/using-github/github-command-palette)."{% endif %} +In addition to the search bar, you can search {% data variables.product.product_name %} using the {% data variables.search.search_page_url %} or {% data variables.search.advanced_url %}. {% ifversion command-palette %}Alternatively, you can use the interactive search in the {% data variables.product.prodname_command_palette %} to search your current location in the UI, a specific user, repository or organization, and globally across all of {% data variables.product.product_name %}, without leaving the keyboard. For more information, see "[AUTOTITLE](/get-started/using-github/github-command-palette)."{% endif %} The {% data variables.search.advanced_url %} provides a visual interface for constructing search queries. You can filter your searches by a variety of factors, such as the number of stars or number of forks a repository has. As you fill in the advanced search fields, your query will automatically be constructed in the top search bar. diff --git a/content/search-github/getting-started-with-searching-on-github/sorting-search-results.md b/content/search-github/getting-started-with-searching-on-github/sorting-search-results.md index 02ee81e6ac..c3dd98a521 100644 --- a/content/search-github/getting-started-with-searching-on-github/sorting-search-results.md +++ b/content/search-github/getting-started-with-searching-on-github/sorting-search-results.md @@ -13,6 +13,15 @@ versions: topics: - GitHub search --- + +{% ifversion code-search-code-view %} + {% note %} + + **Note:** Sorting search results is not supported for {% data variables.product.product_name %} code search. For more information on code search, see "[AUTOTITLE](/search-github/github-code-search/about-github-code-search)." + + {% endnote %} +{% endif %} + Use the **Sort** dropdown menu to sort results by relevance, number of stars, number of forks, and how recently the items were updated. To sort by interactions, reactions, author date, committer date, or how recently the items were updated, you can add a `sort` qualifier to your search query. diff --git a/content/search-github/getting-started-with-searching-on-github/troubleshooting-search-queries.md b/content/search-github/getting-started-with-searching-on-github/troubleshooting-search-queries.md index fa4cabb6e7..c9875aec8a 100644 --- a/content/search-github/getting-started-with-searching-on-github/troubleshooting-search-queries.md +++ b/content/search-github/getting-started-with-searching-on-github/troubleshooting-search-queries.md @@ -27,7 +27,7 @@ There are some limits to the length of the queries when searching across {% data * Queries longer than 256 characters are not supported * You can't construct a query using more than five `AND`, `OR`, or `NOT` operators -Specific search types, such as code search, might have additional limitations. Check the documentation for these search types for more information. +Specific search types, such as code search, might have additional limitations. Check the documentation for these search types for more information. {% ifversion code-search-code-view %} For more information on code search limitations specifically, see "[AUTOTITLE](/search-github/github-code-search/about-github-code-search#limitations)."{% endif %} ## Further reading diff --git a/content/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax.md b/content/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax.md index 0232474848..f30d5f7de3 100644 --- a/content/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax.md +++ b/content/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax.md @@ -15,6 +15,15 @@ topics: - GitHub search shortTitle: Understand search syntax --- + +{% ifversion code-search-code-view %} + {% note %} + + **Note:** The syntax below applies to non-code search. For more information on code search syntax, see "[AUTOTITLE](/search-github/github-code-search/understanding-github-code-search-syntax)." + + {% endnote %} +{% endif %} + ## Query for values greater or less than another value You can use `>`, `>=`, `<`, and `<=` to search for values that are greater than, greater than or equal to, less than, and less than or equal to another value. @@ -86,7 +95,7 @@ If your search query contains whitespace, you will need to surround it with quot * [cats NOT "hello world"](https://github.com/search?utf8=✓&q=cats+NOT+"hello+world"&type=Repositories) matches repositories with the word "cats" but not the words "hello world." * [build label:"bug fix"](https://github.com/search?utf8=%E2%9C%93&q=build+label%3A%22bug+fix%22&type=Issues) matches issues with the word "build" that have the label "bug fix." -Some non-alphanumeric symbols, such as spaces, are dropped from code search queries within quotation marks, so results can be unexpected. +{% ifversion ghes or ghae %} Some non-alphanumeric symbols, such as spaces, are dropped from code search queries within quotation marks, so results can be unexpected.{% endif %} ## Queries with usernames diff --git a/content/search-github/github-code-search/about-github-code-search.md b/content/search-github/github-code-search/about-github-code-search.md index 2fc194851f..0d05c2e7fd 100644 --- a/content/search-github/github-code-search/about-github-code-search.md +++ b/content/search-github/github-code-search/about-github-code-search.md @@ -1,38 +1,24 @@ --- -title: About GitHub Code Search (beta) -intro: 'You can search, navigate and understand code across GitHub with the new code search (beta).' +title: About GitHub Code Search +intro: 'You can search, navigate and understand code across {% data variables.product.prodname_dotcom %} with code search.' allowTitleToDifferFromFilename: true versions: - feature: github-code-search + feature: code-search-code-view topics: - GitHub search --- -{% note %} +## About {% data variables.product.prodname_dotcom %} code search -**Note:** {% data reusables.search.code-search-code-view-beta-note %} +{% data variables.product.prodname_dotcom %} code search lets you rapidly search, navigate and understand your code, your team's code, and the code of the open source community, all from {% data variables.product.prodname_dotcom_the_website %}. This search engine is designed to be scalable, code-aware, and support searching code across {% data variables.product.prodname_dotcom %} using regular expressions, boolean operations, specialized qualifiers, and symbol search. For more information on the syntax of code search, see "[AUTOTITLE](/search-github/github-code-search/understanding-github-code-search-syntax)." -{% data reusables.search.code-view-link %} - -{% endnote %} - -## About the new code search (beta) - -The new code search (beta) lets you rapidly search, navigate and understand your code, your team's code, and the code of the open source community, all from {% data variables.product.prodname_dotcom_the_website %}. This search engine is designed to be scalable, code-aware, and support searching code across GitHub using regular expressions, boolean operations, specialized qualifiers, and symbol search. For more information on the syntax of the new code search (beta), see "[AUTOTITLE](/search-github/github-code-search/understanding-github-code-search-syntax)." - -On top of the new code search engine, the code search (beta) includes new features in the search interface on {% data variables.product.prodname_dotcom_the_website %}, such as suggestions, completions, and the ability to save your searches. The new search interface allows you to more quickly and easily find what you are looking for. For more information, see "[AUTOTITLE](/search-github/github-code-search/using-github-code-search)." +Code search is integrated with features in the search interface on {% data variables.product.prodname_dotcom_the_website %}, such as suggestions, completions, and the ability to save your searches. For more information, see "[AUTOTITLE](/search-github/github-code-search/using-github-code-search)." {% data reusables.search.non-code-search-explanation %} -The new code search (beta) is tightly integrated with a redesigned code view (beta) on {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.search.code-view-link %} - -## Enabling and disabling the new code search and code view (beta) - -{% data reusables.search.enabling-and-disabling-code-search-and-view-beta %} - ## Limitations -We have indexed many public repositories for the new code search (beta), and continue to index more. Additionally, the private repositories of GitHub users in the beta are indexed and searchable by beta participants that already have access to those private repositories on GitHub.com. However, very large repositories may not be indexed at this time, and not all code is indexed. +We have indexed many public repositories for code search, and continue to index more. Additionally, the private repositories of {% data variables.product.prodname_dotcom%} users are indexed and searchable by those that already have access to those private repositories on {% data variables.product.prodname_dotcom_the_website %}. However, very large repositories may not be indexed at this time, and not all code is indexed. The current limitations on indexed code are: - Vendored and generated code is excluded @@ -43,10 +29,10 @@ The current limitations on indexed code are: We currently only support searching for code on the default branch of a repository. -Results for any search with the new code search (beta) are restricted to 100 results (10 pages). Sorting is not supported for code search results at this time. This limitation only applies to searching code with the new code search (beta) and does not apply to other types of searches. +Results for any search with code search are restricted to 100 results (10 pages). Sorting is not supported for code search results at this time. This limitation only applies to searching code with the new code search and does not apply to other types of searches. -The new code search (beta) supports searching for symbol definitions in code, such as function or class definitions, using the `symbol:` qualifier. However, note that the `symbol:` qualifier only searches for definitions and not references, and not all symbol types or languages are fully supported yet. For a list of what languages are supported, see "[AUTOTITLE](/search-github/github-code-search/understanding-github-code-search-syntax#symbol-qualifier)." +Code search supports searching for symbol definitions in code, such as function or class definitions, using the `symbol:` qualifier. However, note that the `symbol:` qualifier only searches for definitions and not references, and not all symbol types or languages are fully supported yet. For a list of what languages are supported, see "[AUTOTITLE](/search-github/github-code-search/understanding-github-code-search-syntax#symbol-qualifier)." ## Feedback and support -You can view and share feedback about the new code search (beta) in our [discussion forum](https://github.com/orgs/community/discussions/categories/code-search-and-navigation). +You can view and share feedback about code search in our [discussion forum](https://github.com/orgs/community/discussions/categories/code-search-and-navigation). diff --git a/content/search-github/github-code-search/index.md b/content/search-github/github-code-search/index.md index 87cc2ea3a2..d8277fb418 100644 --- a/content/search-github/github-code-search/index.md +++ b/content/search-github/github-code-search/index.md @@ -1,9 +1,9 @@ --- -title: GitHub Code Search (beta) +title: GitHub Code Search intro: 'You can use a wide range of syntax to search {% data variables.product.product_name %}. You can adjust the scope of your search, build and troubleshoot queries, and narrow down search results with qualifiers.' allowTitleToDifferFromFilename: true versions: - feature: github-code-search + feature: code-search-code-view topics: - GitHub search children: @@ -11,11 +11,3 @@ children: - /using-github-code-search - /understanding-github-code-search-syntax --- - -{% note %} - -**Note:** {% data reusables.search.code-search-code-view-beta-note %} - -{% data reusables.search.code-search-link %} {% data reusables.search.code-view-link %} - -{% endnote %} diff --git a/content/search-github/github-code-search/understanding-github-code-search-syntax.md b/content/search-github/github-code-search/understanding-github-code-search-syntax.md index 0e8c87694a..8fbd8e6f94 100644 --- a/content/search-github/github-code-search/understanding-github-code-search-syntax.md +++ b/content/search-github/github-code-search/understanding-github-code-search-syntax.md @@ -1,26 +1,19 @@ --- -title: Understanding GitHub Code Search (beta) syntax +title: Understanding GitHub Code Search syntax +shortTitle: Code search syntax intro: 'You can build search queries for the results you want with specialized code qualifiers, regular expressions, and boolean operations.' allowTitleToDifferFromFilename: true versions: - feature: github-code-search + feature: code-search-code-view topics: - GitHub search --- -{% note %} +## About code search query structure -**Note:** {% data reusables.search.code-search-code-view-beta-note %} +The search syntax in this article only applies to searching code with {% data variables.product.prodname_dotcom %} code search. {% data reusables.search.non-code-search-explanation %} -{% data reusables.search.code-search-link %} {% data reusables.search.code-view-link %} - -{% endnote %} - -## About the new code search (beta) query structure - -The search syntax in this article only applies to searching code with the new code search (beta) enabled. {% data reusables.search.non-code-search-explanation %} - -Search queries consist of search terms, comprising text you want to search for, and qualifiers, which narrow down the search. +Search queries consist of search terms, comprising text you want to search for, and qualifiers, which narrow down the search. A bare term with no qualifiers will match either the content of a file or the file's path. @@ -42,11 +35,11 @@ sparse index The search results would include all documents containing both the terms `sparse` and `index`, in any order. As examples, it would match a file containing `SparseIndexVector`, a file with the phrase `index for sparse trees`, and even a file named `index.txt` that contains the term `sparse`. -Searching for multiple terms separated by whitespace is the equivalent to the search `hello AND world`. Other boolean operations, such as `hello OR world`, are also supported in the new code search (beta). For more information about boolean operations, see "[Using boolean operations](#using-boolean-operations)." +Searching for multiple terms separated by whitespace is the equivalent to the search `hello AND world`. Other boolean operations, such as `hello OR world`, are also supported. For more information about boolean operations, see "[Using boolean operations](#using-boolean-operations)." -The new code search (beta) also supports searching for an exact string, including whitespace. For more information, see "[Query for an exact match](#query-for-an-exact-match)." +Code search also supports searching for an exact string, including whitespace. For more information, see "[Query for an exact match](#query-for-an-exact-match)." -You can narrow your code search with specialized qualifiers, such as `repo:`, `language:` and `path:`. For more information on the qualifiers you can use in the new code search (beta), see "[Using qualifiers](#using-qualifiers)." +You can narrow your code search with specialized qualifiers, such as `repo:`, `language:` and `path:`. For more information on the qualifiers you can use in code search, see "[Using qualifiers](#using-qualifiers)." You can also use regular expressions in your searches by surrounding the expression in slashes. For more information on using regular expressions, see "[Using regular expressions](#using-regular-expressions)." @@ -72,7 +65,7 @@ path: git language: "protocol buffers" ## Using boolean operations -The new code search (beta) supports boolean expressions. You can use the operators `AND`, `OR`, and `NOT` to combine search terms. +Code search supports boolean expressions. You can use the operators `AND`, `OR`, and `NOT` to combine search terms. By default, adjacent terms separated by whitespace are equivalent to using the `AND` operator. For example, the search query `sparse index` is the same as `sparse AND index`, meaning that the search results will include all documents containing both the terms `sparse` and `index`, in any order. @@ -121,7 +114,7 @@ repo:github-linguist/linguist OR repo:tree-sitter/tree-sitter {% note %} -**Note:** The new code search beta does not currently support regular expressions or partial matching for repository names, so you will have to type the entire repository name (including the user prefix) for the `repo:` qualifier to work. +**Note:** Code search does not currently support regular expressions or partial matching for repository names, so you will have to type the entire repository name (including the user prefix) for the `repo:` qualifier to work. {% endnote %} @@ -141,7 +134,7 @@ user:octocat {% note %} -**Note:** The new code search beta does not currently support regular expressions or partial matching for organization or user names, so you will have to type the entire organization or user name for the qualifier to work. +**Note:** Code search does not currently support regular expressions or partial matching for organization or user names, so you will have to type the entire organization or user name for the qualifier to work. {% endnote %} @@ -279,7 +272,7 @@ log4j NOT is:fork ## Using regular expressions -The new code search (beta) supports regular expressions to search for patterns in your code. You can use regular expressions in bare search terms as well as within many qualifiers, by surrounding the regex in slashes. +Code search supports regular expressions to search for patterns in your code. You can use regular expressions in bare search terms as well as within many qualifiers, by surrounding the regex in slashes. For example, to search for the regular expression `sparse.*index`, you would use: diff --git a/content/search-github/github-code-search/using-github-code-search.md b/content/search-github/github-code-search/using-github-code-search.md index 1560bed740..948311dce9 100644 --- a/content/search-github/github-code-search/using-github-code-search.md +++ b/content/search-github/github-code-search/using-github-code-search.md @@ -1,34 +1,24 @@ --- -title: Using GitHub Code Search (beta) +title: Using GitHub Code Search intro: 'You can use suggestions, completions and saved searches in the upgraded search interface to quickly find what you are looking for across {% data variables.product.prodname_dotcom_the_website %}.' allowTitleToDifferFromFilename: true versions: - feature: github-code-search + feature: code-search-code-view topics: - GitHub search --- -{% note %} +## About using {% data variables.product.prodname_dotcom%} code search -**Note:** {% data reusables.search.code-search-code-view-beta-note %} - -{% data reusables.search.code-search-link %} {% data reusables.search.code-view-link %} - -{% endnote %} - -## About using the new code search (beta) - -Upon getting access to the new code search beta, GitHub will index any repositories you own and any repositories in organizations you are a member of, whether public, private, or internal. This means that you can search across all of your repositories, in addition to the public repositories on {% data variables.product.prodname_dotcom_the_website %} that have already been indexed. Only users with permission to view your code on {% data variables.product.prodname_dotcom_the_website %} will be able to see your code in search results. Forks are indexed and searchable in the same way as other repositories. +{% data variables.product.prodname_dotcom %} indexes repositories you own and repositories in organizations you are a member of, whether public, private, or internal. This means that you can search across all of your repositories, in addition to the public repositories on {% data variables.product.prodname_dotcom_the_website %} that have already been indexed. Only users with permission to view your code on {% data variables.product.prodname_dotcom_the_website %} will be able to see your code in search results. Forks are indexed and searchable in the same way as other repositories. Not all code is indexed, and you can currently only search the default branches of repositories. For more information on known limitations, see "[AUTOTITLE](/search-github/github-code-search/about-github-code-search#limitations)." -The new code search beta is integrated within the new code view beta. {% data reusables.search.code-view-link %} - ## Using the search bar -On top of the new code search engine, the beta includes an upgraded search interface on {% data variables.product.prodname_dotcom_the_website %}. Using suggestions, completions, and saved searches, you can quickly find what you are looking for, often without having to fully type a query or view the search results page. +You can search using the search interface on {% data variables.product.prodname_dotcom_the_website %}. Using suggestions, completions, and saved searches, you can quickly find what you are looking for, often without having to fully type a query or view the search results page. -For more information about the search syntax of the new code search (beta), see "[AUTOTITLE](/search-github/github-code-search/understanding-github-code-search-syntax)." +For more information about the search syntax of code search, see "[AUTOTITLE](/search-github/github-code-search/understanding-github-code-search-syntax)." {% data reusables.search.non-code-search-explanation %} @@ -56,8 +46,6 @@ For more information about the search syntax of the new code search (beta), see ## Using the search results view -The search results view already exists for the classic search on GitHub, and the functionality for most search types, except code, is the same. With the new code search beta enabled, the search results page has a redesigned UI and includes filters that are supported in the new code search engine, such as path and symbol filters. - To construct a search query, as well as view and filter results, using a visual interface, you can use the {% data variables.search.search_page_url %} or {% data variables.search.advanced_url %}. If you press Enter after typing a search query in the search bar, you will also be taken to the search results view. On the search results view, you can navigate between different types of search results, including code, issues, pull request, repositories, and more. You can also view and use filters. diff --git a/content/search-github/index.md b/content/search-github/index.md index 90d314f08d..1b6d0431e9 100644 --- a/content/search-github/index.md +++ b/content/search-github/index.md @@ -7,6 +7,7 @@ featuredLinks: startHere: - /search-github/searching-on-github/searching-issues-and-pull-requests - /search-github/searching-on-github/searching-code + - /search-github/github-code-search/understanding-github-code-search-syntax - /search-github/searching-on-github/searching-for-repositories - /search-github/searching-on-github/searching-commits popular: diff --git a/content/search-github/searching-on-github/finding-files-on-github.md b/content/search-github/searching-on-github/finding-files-on-github.md index b4c3e31bb5..5a75d51600 100644 --- a/content/search-github/searching-on-github/finding-files-on-github.md +++ b/content/search-github/searching-on-github/finding-files-on-github.md @@ -1,6 +1,6 @@ --- title: Finding files on GitHub -intro: 'You can search for a file in a repository using the file finder. To search for a file in multiple repositories on {% data variables.product.product_name %}, use the [`filename` code search qualifier](/search-github/searching-on-github/searching-code#search-by-filename).' +intro: 'You can search for a file in a repository using the file finder. To search for a file in multiple repositories on {% data variables.product.product_name %}, use the {% ifversion code-search-code-view %}[`path` code search qualifier](/search-github/github-code-search/understanding-github-code-search-syntax#path-qualifier){% else %}[`filename` code search qualifier](/search-github/searching-on-github/searching-code#search-by-filename){% endif %}.' redirect_from: - /articles/finding-files-on-github - /github/searching-for-information-on-github/finding-files-on-github @@ -17,19 +17,28 @@ topics: **Tips:** -- By default, file finder results exclude some directories like `build`, `log`, `tmp`, and `vendor`. To search for files in these directories, use the [`filename` code search qualifier](/search-github/searching-on-github/searching-code#search-by-filename).{% ifversion file-finder-exclusion-controls %} Alternatively, you can customize which directories are excluded by default [using a `.gitattributes` file](#customizing-excluded-files).{% endif %} +- By default, file finder results exclude some directories like `build`, `log`, `tmp`, and `vendor`. To search for files in these directories, {% ifversion code-search-code-view %}use the [`path` code search qualifier](/search-github/github-code-search/understanding-github-code-search-syntax#path-qualifier){% else %}use the [`filename` code search qualifier](/search-github/searching-on-github/searching-code#search-by-filename){% endif %}.{% ifversion file-finder-exclusion-controls %} Alternatively, you can customize which directories are excluded by default [using a `.gitattributes` file](#customizing-excluded-files).{% endif %} - You can also open the file finder by pressing `t` on your keyboard. For more information, see "[AUTOTITLE](/get-started/using-github/keyboard-shortcuts)." {% endtip %} ## Using the file finder +{% ifversion code-search-code-view %} {% data reusables.repositories.navigate-to-repo %} -2. Above the list of files, click **Go to file**. -![Screenshot of a row of buttons on the main page of a repository. The "Go to file" button is outlined in dark orange.](/assets/images/help/search/find-file-button.png) -3. In the search field, type the name of the file you'd like to find. -![Screenshot of the search bar for finding a file in a repository. The search bar contains the term "readme" and under the search bar is a link to the file that is the result of the search, "README.md". The search bar is outlined in dark orange. ](/assets/images/help/search/find-file-search-field.png) -4. In the list of results, click the file you wanted to find. +1. In the file tree view, click the {% octicon "filter" aria-hidden="true" %} **Jump to file** search bar. You can also find the {% octicon "filter" aria-hidden="true" %} **Jump to file** search bar at the top of the integrated file editor. + + ![Screenshot of the file tree view for a repository. A search bar, labeled "Jump to file", is outlined in dark orange.](/assets/images/help/repository/file-tree-view-jump-to-file.png) +1. In the search bar, type the name of the file or directory you'd like to find. +1. In the list of results, click the file or directory you wanted to find. You can view the file path for a directory or file below each search result. +{% else %} +{% data reusables.repositories.navigate-to-repo %} +1. Above the list of files, click **Go to file**. + ![Screenshot of a row of buttons on the main page of a repository. The "Go to file" button is outlined in dark orange.](/assets/images/help/search/find-file-button.png) +1. In the search field, type the name of the file you'd like to find. + ![Screenshot of the search bar for finding a file in a repository. The search bar contains the term "readme" and under the search bar is a link to the file that is the result of the search, "README.md". The search bar is outlined in dark orange.](/assets/images/help/search/find-file-search-field.png) +1. In the list of results, click the file you wanted to find. +{% endif %} {% ifversion file-finder-exclusion-controls %} diff --git a/content/search-github/searching-on-github/searching-code.md b/content/search-github/searching-on-github/searching-code.md index cbea9e3af3..800445a127 100644 --- a/content/search-github/searching-on-github/searching-code.md +++ b/content/search-github/searching-on-github/searching-code.md @@ -8,22 +8,12 @@ redirect_from: - /github/searching-for-information-on-github/searching-code - /github/searching-for-information-on-github/searching-on-github/searching-code versions: - fpt: '*' ghes: '*' ghae: '*' - ghec: '*' topics: - GitHub search --- -{% ifversion github-code-search %} - {% note %} - - **Note:** {% data reusables.search.classic-search-code-search-note %} - - {% endnote %} -{% endif %} - {% data reusables.search.you-can-search-globally %} For more information, see "[AUTOTITLE](/search-github/getting-started-with-searching-on-github/about-searching-on-github)." You can only search code using these code search qualifiers. Search qualifiers specifically for repositories, users, or commits, will not work when searching for code. diff --git a/content/search-github/searching-on-github/searching-for-repositories.md b/content/search-github/searching-on-github/searching-for-repositories.md index b3839a7365..18bc217a21 100644 --- a/content/search-github/searching-on-github/searching-for-repositories.md +++ b/content/search-github/searching-on-github/searching-for-repositories.md @@ -37,7 +37,7 @@ With the `in` qualifier you can restrict your search to the repository name, rep You can find a repository by searching for content in the repository's README file using the `in:readme` qualifier. For more information, see "[AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)." -Besides using `in:readme`, it's not possible to find repositories by searching for specific content within the repository. To search for a specific file or content within a repository, you can use the file finder or code-specific search qualifiers. For more information, see "[AUTOTITLE](/search-github/searching-on-github/finding-files-on-github)" and "[AUTOTITLE](/search-github/searching-on-github/searching-code)." +Besides using `in:readme`, it's not possible to find repositories by searching for specific content within the repository. To search for a specific file or content within a repository, you can use the file finder or code-specific search qualifiers. For more information, see "[AUTOTITLE](/search-github/searching-on-github/finding-files-on-github)" and "[AUTOTITLE]{% ifversion code-search-code-view %}(/search-github/github-code-search/understanding-github-code-search-syntax){% else %}(/search-github/searching-on-github/searching-code){% endif %}." | Qualifier | Example | ------------- | ------------- diff --git a/content/search-github/searching-on-github/searching-in-forks.md b/content/search-github/searching-on-github/searching-in-forks.md index 573e0e8942..f799ba0037 100644 --- a/content/search-github/searching-on-github/searching-in-forks.md +++ b/content/search-github/searching-on-github/searching-in-forks.md @@ -15,7 +15,7 @@ topics: --- To show forks in [repository search](/search-github/searching-on-github/searching-for-repositories) results, add `fork:true` or `fork:only` to your query. -Forks are only indexed for [code search](/search-github/searching-on-github/searching-code) when they have more stars than the parent repository. You will not be able to search the code in a fork that has less stars than its parent. To show forks with more stars than the parent repository in code search results, add `fork:true` or `fork:only` to your query. +{% ifversion ghes or ghae %}Forks are only indexed for [code search](/search-github/searching-on-github/searching-code) when they have more stars than the parent repository. You will not be able to search the code in a fork that has less stars than its parent. To show forks with more stars than the parent repository in code search results, add `fork:true` or `fork:only` to your query.{% endif%} The `fork:true` qualifier finds all results that match your search query, including forks. The `fork:only` qualifier finds _only_ forks that match your search query. diff --git a/data/features/github-code-search.yml b/data/features/code-search-code-view.yml similarity index 91% rename from data/features/github-code-search.yml rename to data/features/code-search-code-view.yml index 2b1a52a73e..2f7d7c4f9b 100644 --- a/data/features/github-code-search.yml +++ b/data/features/code-search-code-view.yml @@ -4,4 +4,3 @@ versions: fpt: '*' ghec: '*' - ghes: '>3.9' diff --git a/data/features/file-tree-view.yml b/data/features/file-tree-view.yml deleted file mode 100644 index 15af3fa1c0..0000000000 --- a/data/features/file-tree-view.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Reference for limited public beta: Issue #6669 — New Code View -# Reference for public beta: #9287 - -versions: - fpt: '*' - ghec: '*' - ghes: '>3.9' diff --git a/data/reusables/files/add-file.md b/data/reusables/files/add-file.md index bee5a686bd..7c611b5853 100644 --- a/data/reusables/files/add-file.md +++ b/data/reusables/files/add-file.md @@ -1,3 +1,9 @@ -1. Above the list of files, select the **Add file** dropdown, then click **Create new file**. +{% ifversion code-search-code-view %} +1. Above the list of files, select the **Add file** {% octicon "triangle-down" aria-label="The downwards-facing triangle icon" %} dropdown menu, then click {% octicon "plus" aria-label="The plus sign icon" %} **Create new file**. - ![Screenshot of the main page of the repository. Above the list of a files, a button, labeled "Add file," is outlined in dark orange.](/assets/images/help/repository/upload-files-button.png) + Alternatively, you can click {% octicon "plus" aria-label="The plus sign icon" %} in the file tree view on the left. + + ![Screenshot of the main page of the repository. Above the list of a files, a button, labeled "Add file," is outlined in dark orange. In the file tree view of the repository, a button, with the plus sign icon, is also outlined in dark orange. ](/assets/images/help/repository/add-files-buttons.png) +{% else %} +1. Above the list of files, using the **Add file** drop-down, click **Create new file**. +{% endif %} diff --git a/data/reusables/files/choose-commit-email.md b/data/reusables/files/choose-commit-email.md index 05a507e28f..d228137452 100644 --- a/data/reusables/files/choose-commit-email.md +++ b/data/reusables/files/choose-commit-email.md @@ -1,4 +1,5 @@ {%- ifversion fpt or ghec %} 1. If you have more than one email address associated with your account on {% data variables.location.product_location %}, click the email address drop-down menu and select the email address to use as the Git author email address. Only verified email addresses appear in this drop-down menu. If you enabled email address privacy, then `@users.noreply.github.com` is the default commit author email address. For more information, see "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address)." -![Screenshot of a {% data variables.product.prodname_dotcom %} pull request showing a dropdown menu with options to choose the commit author email address. octocat@github.com is selected.](/assets/images/help/repository/choose-commit-email-address.png) + + ![Screenshot of a {% data variables.product.prodname_dotcom %} pull request showing a dropdown menu with options to choose the commit author email address. octocat@github.com is selected.](/assets/images/help/repository/choose-commit-email-address.png) {%- endif %} diff --git a/data/reusables/files/choose_commit_branch.md b/data/reusables/files/choose_commit_branch.md index f2968bf5f4..c7a7a2f39a 100644 --- a/data/reusables/files/choose_commit_branch.md +++ b/data/reusables/files/choose_commit_branch.md @@ -1,2 +1,3 @@ 1. Below the commit message fields, decide whether to add your commit to the current branch or to a new branch. If your current branch is the default branch, you should choose to create a new branch for your commit and then create a pull request. For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)." + ![Screenshot of a {% data variables.product.prodname_dotcom %} pull request showing a radio button to commit directly to the main branch or to create a new branch. New branch is selected.](/assets/images/help/repository/choose-commit-branch.png) diff --git a/data/reusables/files/preview_change.md b/data/reusables/files/preview_change.md index fdd0d7a6d2..6e9648db9c 100644 --- a/data/reusables/files/preview_change.md +++ b/data/reusables/files/preview_change.md @@ -1,3 +1,8 @@ +{% ifversion code-search-code-view %} 1. Above the new content, click **Preview**. ![Screenshot of a file in edit mode. Above the file's contents, a tab labeled "Preview" is outlined in dark orange.](/assets/images/help/repository/edit-readme-preview-changes.png) +{% else %} +1. Above the new content, click **Preview changes**. + ![Screenshot of a file in edit mode. Above the file's contents, a tab labeled "Preview" is outlined in dark orange.](/assets/images/enterprise/repository/edit-readme-preview-changes.png) +{% endif %} \ No newline at end of file diff --git a/data/reusables/files/propose_file_change.md b/data/reusables/files/propose_file_change.md index 829ce1c33c..a1839b744e 100644 --- a/data/reusables/files/propose_file_change.md +++ b/data/reusables/files/propose_file_change.md @@ -1 +1,2 @@ 1. Click **Commit changes** or **Propose changes**. + diff --git a/data/reusables/files/propose_new_file.md b/data/reusables/files/propose_new_file.md index 829ce1c33c..a1839b744e 100644 --- a/data/reusables/files/propose_new_file.md +++ b/data/reusables/files/propose_new_file.md @@ -1 +1,2 @@ 1. Click **Commit changes** or **Propose changes**. + diff --git a/data/reusables/files/write_commit_message.md b/data/reusables/files/write_commit_message.md index 76adbdd0fd..b9399a0704 100644 --- a/data/reusables/files/write_commit_message.md +++ b/data/reusables/files/write_commit_message.md @@ -1,2 +1,4 @@ +{% ifversion code-search-code-view %} 1. Click **Commit changes...** +{% endif %} 1. In the "Commit message" field, type a short, meaningful commit message that describes the change you made to the file. You can attribute the commit to more than one author in the commit message. For more information, see "[AUTOTITLE](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors)." diff --git a/data/reusables/repositories/copy-clone-url.md b/data/reusables/repositories/copy-clone-url.md index 468c991727..ddb5ee16a3 100644 --- a/data/reusables/repositories/copy-clone-url.md +++ b/data/reusables/repositories/copy-clone-url.md @@ -1,9 +1,10 @@ 1. Above the list of files, click {% octicon "code" aria-hidden="true" %} **Code**. ![Screenshot of the list of files on the landing page of a repository. The "Code" button is highlighted with a dark orange outline.](/assets/images/help/repository/code-button.png) + 1. Copy the URL for the repository. - To clone the repository using HTTPS, under "HTTPS", click {% octicon "clippy" aria-label="Copy to clipboard" %}. - To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority, click **SSH**, then click {% octicon "clippy" aria-label="Copy to clipboard" %}. - To clone a repository using {% data variables.product.prodname_cli %}, click **{% data variables.product.prodname_cli %}**, then click {% octicon "copy" aria-label="Copy to clipboard" %}. - + ![Screenshot of the "Code" dropdown menu. To the right of the HTTPS URL for the repository, a copy icon is outlined in dark orange.](/assets/images/help/repository/https-url-clone-cli.png) diff --git a/data/reusables/repositories/edit-file-button.md b/data/reusables/repositories/edit-file-button.md index b3d20b3c20..337e31ac1b 100644 --- a/data/reusables/repositories/edit-file-button.md +++ b/data/reusables/repositories/edit-file-button.md @@ -1,3 +1,6 @@ 1. In the upper right corner of the file view, click {% octicon "pencil" aria-label="Edit file" %} to open the file editor. - - ![Screenshot of a file. In the header, a button, labeled with a pencil icon, is outlined in dark orange.](/assets/images/help/repository/edit-file-edit-button.png) \ No newline at end of file +{% ifversion code-search-code-view %} + ![Screenshot of a file. In the header, a button, labeled with a pencil icon, is outlined in dark orange.](/assets/images/help/repository/edit-file-edit-button.png) +{% else %} + ![Screenshot of a file. In the header, a button, labeled with a pencil icon, is outlined in dark orange.](/assets/images/enterprise/repository/edit-file-edit-button.png) +{% endif%} \ No newline at end of file diff --git a/data/reusables/repositories/edit-file.md b/data/reusables/repositories/edit-file.md index b24e692b19..f26f48f60d 100644 --- a/data/reusables/repositories/edit-file.md +++ b/data/reusables/repositories/edit-file.md @@ -3,7 +3,7 @@ {% ifversion githubdev-editor -%} {% note %} - **Note:** Instead of editing and committing the file using the default file editor, you can optionally choose to use the [github.dev code editor](/codespaces/the-githubdev-web-based-editor) by selecting the {% octicon "triangle-down" aria-label="More edit options" %} dropdown menu and clicking **Open in github.dev**. + **Note:** Instead of editing and committing the file using the default file editor, you can optionally choose to use the [github.dev code editor](/codespaces/the-githubdev-web-based-editor) by selecting the {% octicon "triangle-down" aria-label="More edit options" %} dropdown menu and clicking **github.dev**. You can also clone the repository and edit the file locally via {% data variables.product.prodname_desktop %} by clicking **{% data variables.product.prodname_desktop %}**. ![Screenshot of a file. In the header, a downwards-facing triangle icon is outlined in dark orange.](/assets/images/help/repository/edit-file-edit-dropdown.png) diff --git a/data/reusables/repositories/navigate-to-branches.md b/data/reusables/repositories/navigate-to-branches.md index 1a803405ac..5c3f70014e 100644 --- a/data/reusables/repositories/navigate-to-branches.md +++ b/data/reusables/repositories/navigate-to-branches.md @@ -1,3 +1,9 @@ +{% ifversion code-search-code-view %} +1. From the file tree view on the left, select the {% octicon "git-branch" aria-hidden="true" %} branch dropdown menu, then click **View all branches**. You can also find the branch dropdown menu at the top of the integrated file editor. + + ![Screenshot of the file tree view for a repository. A dropdown menu for branches is expanded and outlined in dark orange.](/assets/images/help/repository/file-tree-view-branch-dropdown-expanded.png) +{% else %} 1. Above the list of files, click {% octicon "git-branch" aria-hidden="true" %} **Branches**. ![Screenshot of the repository page. A link, labeled "55 branches", is highlighted with an orange outline.](/assets/images/help/branches/branches-overview-link.png) +{% endif %} \ No newline at end of file diff --git a/data/reusables/repositories/open-with-github-desktop.md b/data/reusables/repositories/open-with-github-desktop.md index ec57b9347c..bd22436f96 100644 --- a/data/reusables/repositories/open-with-github-desktop.md +++ b/data/reusables/repositories/open-with-github-desktop.md @@ -2,4 +2,4 @@ ![Screenshot of the list of files on the landing page of a repository. The "Code" button is highlighted with a dark orange outline.](/assets/images/help/repository/code-button.png) 1. To clone and open the repository with {% data variables.product.prodname_desktop %}, click {% octicon "desktop-download" aria-hidden="true" %} **Open with {% data variables.product.prodname_desktop %}**. - ![Screenshot of the "Code" dropdown for a repository. A button, labeled "Open with GitHub Desktop" is outlined in dark orange.](/assets/images/help/repository/open-with-desktop.png) + ![Screenshot of the "Code" dropdown for a repository. A button, labeled "Open with {% data variables.product.prodname_desktop %}" is outlined in dark orange.](/assets/images/help/repository/open-with-desktop.png) diff --git a/data/reusables/search/classic-search-code-search-note.md b/data/reusables/search/classic-search-code-search-note.md index 56eef22f55..93e9da5652 100644 --- a/data/reusables/search/classic-search-code-search-note.md +++ b/data/reusables/search/classic-search-code-search-note.md @@ -1,3 +1 @@ -This article refers to the classic GitHub search experience. If you are participating in the new code search and code view beta and have enabled the new functionality, the syntax for searching code and the GitHub.com search interface will differ. However, the search syntax for non-code search types will stay the same. - -For information about the new code search and code view, currently in public beta, see "[AUTOTITLE](/search-github/github-code-search/about-github-code-search)" and "[AUTOTITLE](/repositories/working-with-files/managing-files/navigating-files-with-the-new-code-view)." +This article refers to the classic {% data variables.product.prodname_dotcom %} search experience. If you are participating in the new code search and code view beta and have enabled the new functionality, the syntax for searching code and the {% data variables.product.prodname_dotcom_the_website %} search interface will differ. However, the search syntax for non-code search types will stay the same. diff --git a/data/reusables/search/code-search-code-view-beta-note.md b/data/reusables/search/code-search-code-view-beta-note.md deleted file mode 100644 index a55d57ae46..0000000000 --- a/data/reusables/search/code-search-code-view-beta-note.md +++ /dev/null @@ -1 +0,0 @@ -The new code search and code view are in public beta. diff --git a/data/reusables/search/enabling-and-disabling-code-search-and-view-beta.md b/data/reusables/search/enabling-and-disabling-code-search-and-view-beta.md deleted file mode 100644 index 685ca3d571..0000000000 --- a/data/reusables/search/enabling-and-disabling-code-search-and-view-beta.md +++ /dev/null @@ -1,4 +0,0 @@ -You can disable or enable the beta on {% data variables.product.prodname_dotcom_the_website %} anytime. Note that this setting applies to both the code search and the code view. - -{% data reusables.feature-preview.feature-preview-setting %} -1. To the right of "New Code Search and Code View (Beta)", click **Enable** or **Disable**. diff --git a/data/reusables/search/non-code-search-explanation.md b/data/reusables/search/non-code-search-explanation.md index 26ae109a41..ef9a04224b 100644 --- a/data/reusables/search/non-code-search-explanation.md +++ b/data/reusables/search/non-code-search-explanation.md @@ -1 +1 @@ -Note that the syntax and qualifiers for searching for non-code content, such as issues, users, and discussions, work the same as before. For more information on non-code search, see "[AUTOTITLE](/search-github/getting-started-with-searching-on-github/about-searching-on-github)" and "[AUTOTITLE](/search-github/searching-on-github)." +Note that the syntax and qualifiers for searching for non-code content, such as issues, users, and discussions, is not the same as the syntax for code search. For more information on non-code search, see "[AUTOTITLE](/search-github/getting-started-with-searching-on-github/about-searching-on-github)" and "[AUTOTITLE](/search-github/searching-on-github)."