Skip to content

Commit

Permalink
Merge pull request #35418 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Nov 25, 2024
2 parents e27b251 + c48a150 commit 3e3bb37
Show file tree
Hide file tree
Showing 12 changed files with 235 additions and 18 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ redirect_from:

## About forking

If you want to contribute to someone else's project but don't have write access to the repository, you can use a "fork and pull request" workflow.
If you want to contribute to someone else's project but dont have permission to make changes directly, you can create your own copy of the project, make updates, and then suggest those updates for inclusion in the main project. This process is often called a "fork and pull request" workflow.

{% data reusables.repositories.fork-definition-long %}
When you create your own copy (or "fork") of a project, it’s like making a new workspace that shares code with the original project. This is useful for open-source projects or anytime you don’t have write access to the original project.

You can contribute by submitting pull requests from your fork to the upstream repository. For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)."
Once you’ve made your changes in your copy, you can submit them as a pull request, which is a way to propose changes back to the main project. For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)."

## Forking a repository
## Creating your own copy of a project

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 %} that lets you test the fork and pull request workflow.

Expand All @@ -44,7 +44,7 @@ This tutorial uses [the Spoon-Knife project](https://github.com/octocat/Spoon-Kn
> [!NOTE]
> If you want to copy additional branches from the upstream repository, you can do so from the **Branches** page. For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository)."
## Cloning a fork
## Cloning a fork to your computer

You've successfully forked the Spoon-Knife repository, but so far, it only exists on {% data variables.product.product_name %}. To be able to work on the project, you will need to clone it to your computer.

Expand Down Expand Up @@ -99,7 +99,7 @@ gh repo fork REPOSITORY --clone=true

## Creating a branch to work on

Before making changes to the project, you should create a new branch and check it out. By keeping changes in their own branch, you follow GitHub Flow and ensure that it will be easier to contribute to the same project again in the future. For more information, see "[AUTOTITLE](/get-started/using-github/github-flow#following-github-flow)."
Before making changes to the project, you should create a new branch and check it out. By keeping changes in their own branch, you follow {% data variables.product.github %} flow and ensure that it will be easier to contribute to the same project again in the future. See "[AUTOTITLE](/get-started/using-github/github-flow#following-github-flow)."

{% webui %}

Expand Down Expand Up @@ -127,7 +127,7 @@ For more information about how to create and manage branches in {% data variable

## Making and pushing changes

Go ahead and make a few changes to the project using your favorite text editor, like [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com). You could, for example, change the text in `index.html` to add your GitHub username.
Go ahead and make a few changes to the project using your favorite text editor, like [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com). You could, for example, change the text in `index.html` to add your {% data variables.product.github %} username.

When you're ready to submit your changes, stage and commit your changes. `git add .` tells Git that you want to include all of your changes in the next commit. `git commit` takes a snapshot of those changes.
Expand Down Expand Up @@ -199,3 +199,9 @@ Pull requests are an area for discussion. Don't be offended if the project owner

You've successfully forked and contributed back to a repository. Go forth, and
contribute some more!{% ifversion fpt %} For more information, see "[AUTOTITLE](/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)."{% endif %}
{% ifversion copilot %}
## Familiarizing yourself with a project
If you're new to a project, you can use {% data variables.product.prodname_copilot_short %} to help you understand the purpose of the repository, examine files, and dive into specific lines of code. See "[AUTOTITLE](/get-started/exploring-projects-on-github/using-github-copilot-to-explore-projects)."{% endif %}
1 change: 1 addition & 0 deletions content/get-started/exploring-projects-on-github/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ topics:
- Projects
children:
- /finding-ways-to-contribute-to-open-source-on-github
- /using-github-copilot-to-explore-projects
- /contributing-to-a-project
- /saving-repositories-with-stars
- /following-people
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Using GitHub Copilot to explore projects
intro: 'This guide will help you use {% data variables.product.prodname_copilot_short %} to explore projects on {% data variables.product.prodname_dotcom %}.'
versions:
feature: copilot
topics:
- Copilot
- Repositories
shortTitle: Use Copilot to explore projects
---

> [!NOTE] {% data variables.product.prodname_copilot_chat_dotcom %} is currently in {% data variables.release-phases.public_preview %} and is subject to change.
In this guide, you’ll learn how to use {% data variables.product.prodname_copilot_chat_dotcom_short %} to understand a repository’s purpose, examine files, and dive into specific lines of code. By following these steps, you’ll gain insights into any project faster—making onboarding, code review, and project exploration easier and more efficient.

## Prerequisites

{% data reusables.copilot.copilot-requires-subscription %}

## Understanding a repository

When you’re new to a project, it can be challenging to understand the purpose of a repository and its files. {% data variables.product.prodname_copilot_short %} can help you quickly understand the purpose of a repository, for example, by providing a summary of the repository’s README file.

1. On the {% data variables.product.prodname_dotcom %} website, go to the repository you want to chat about.

1. Click the **{% octicon "copilot" aria-hidden="true" %}** {% data variables.product.prodname_copilot %} icon at the top right of the page.
1. The heading at the top of the chat panel should read "Chatting about" followed by the name of the current repository.

If the wrong repository name is displayed, because you were previously chatting about another repository, click **All repositories** then choose the repository you want to chat about.

![Screenshot of the {% data variables.product.prodname_copilot_short %} chat panel page with "All repositories" highlighted with a dark orange outline.](/assets/images/help/copilot/copilot-chat-all-repositories.png)

1. In the "Ask {% data variables.product.prodname_copilot_short %}" box, at the bottom of the chat panel, type "Summarize the purpose of this repository based on the README" and press <kbd>Enter</kbd>. {% data variables.product.prodname_copilot_short %} replies in the chat panel.

You can also use {% data variables.product.prodname_copilot_short %} to understand the roles of different folders and files within the repository. For example, you can ask {% data variables.product.prodname_copilot_short %} to summarize the contents of a specific file, or to explain the purpose of a specific folder.

## Exploring files and code

When you’re exploring a project, you might want to understand the contents of a specific file. {% data variables.product.prodname_copilot_short %} can help you quickly understand the purpose of a file, for example, by providing a summary of the file’s contents. You can also ask {% data variables.product.prodname_copilot_short %} to explain specific lines of code within a file.

{% data reusables.copilot.chat-about-specific-lines %}

## Next steps

Now that you know how to use {% data variables.product.prodname_copilot_short %} to explore projects, you can use it to help you understand any repository, file, or line of code on {% data variables.product.prodname_dotcom %}.
38 changes: 33 additions & 5 deletions content/get-started/using-github/communicating-on-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ You can create and participate in issues, pull requests and team discussions, de

### Team discussions

* can be started on your team's page for conversations that span across projects and don't belong in a specific issue or pull request. Instead of opening an issue in a repository to discuss an idea, you can include the entire team by having a conversation in a team discussion.
* allow you to hold discussions with your team about planning, analysis, design, user research and general project decision making in one place.{% ifversion ghes %}
* provide a collaborative experience outside the codebase, allowing the brainstorming of ideas.
* often don’t have a clear owner.
* often do not result in an actionable task.{% endif %}
* Can be started on your team's page for conversations that span across projects and don't belong in a specific issue or pull request. Instead of opening an issue in a repository to discuss an idea, you can include the entire team by having a conversation in a team discussion.
* Allow you to hold discussions with your team about planning, analysis, design, user research and general project decision making in one place.{% ifversion ghes %}
* Provide a collaborative experience outside the codebase, allowing the brainstorming of ideas.
* Often don’t have a clear owner.
* Often do not result in an actionable task.{% endif %}
{% endif %}

## Which discussion tool should I use?
Expand Down Expand Up @@ -148,6 +148,34 @@ The `octocat` team member posted a team discussion, informing the team of variou
* Material about the April All Hands is now available for all team members to view.
{% endif %}

{% ifversion copilot %}

## Using {% data variables.product.prodname_copilot_short %} to gain context

> [!NOTE] {% data reusables.copilot.copilot-requires-subscription %}
If you need more context or clarity on a specific issue or discussion, you can use {% data variables.product.prodname_copilot %} to help answer your questions. This enables you to quickly gain insights, understand complex threads, and stay aligned with the project’s goals, fostering collaboration and knowledge sharing within the community.

To ask a question about an issue or discussion:

1. From anywhere on {% data variables.product.github %}, click the **{% octicon "copilot" aria-hidden="true" %}** {% data variables.product.prodname_copilot %} icon next to the search bar in the top right of the page.

![Screenshot of the new conversation button, highlighted with a dark orange outline.](/assets/images/help/copilot/copilot-icon-top-right.png)

1. In the "Ask {% data variables.product.prodname_copilot_short %}" box, type a question and include the relevant URL in your message. For example, you could ask:

* `Explain https://github.com/monalisa/octokit/issues/1`
* `Summarize https://github.com/monalisa/octokit/discussions/4`
* `Recommend next steps for https://github.com/monalisa/octokit/issues/2`
* `What are the acceptance criteria for ISSUE URL?`
* `What are the main points made by PERSON in DISCUSSION URL?`

If you chat with {% data variables.product.prodname_copilot %} from a specific issue or discussion, you don't need to include the URL in your question.

{% data reusables.copilot.stop-response-generation %}

{% endif %}

## Next steps

These examples showed you how to decide which is the best tool for your conversations on {% data variables.product.product_name %}. But this is only the beginning; there is so much more you can do to tailor these tools to your needs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,41 @@ Below we have added a task list to our Project Octocat issue, breaking it down i

{% endif %}

{% ifversion copilot %}

## Understanding new issues

> [!NOTE] {% data reusables.copilot.copilot-requires-subscription %}
When working on an unfamiliar or complex issue, {% data variables.product.prodname_copilot %} can help you quickly understand the context, history, and key information, so you can get started faster and with more confidence.

### Reviewing the issue

1. Navigate to an issue on {% data variables.product.github %}.

{% data reusables.copilot.open-copilot %}

1. At the bottom of the {% data variables.product.prodname_copilot_short %} chat panel, in the "Ask {% data variables.product.prodname_copilot_short %}" box, type a question and press <kbd>Enter</kbd>. For example, you could enter:

* `Summarize the main points of this issue`
* `What’s the goal of this issue?`

{% data variables.product.prodname_copilot_short %}'s summary will help you capture the purpose and scope of the work.

### Understanding the history and comments

Issues often contain a history of discussions and decisions that can provide important context. You can use {% data variables.product.prodname_copilot_short %} to summarize these conversations to identify key points, such as proposed solutions or unanswered questions. For example, you might ask {% data variables.product.prodname_copilot_short %} to summarize recent comments or highlight decisions that have already been made. This helps you focus on what’s most relevant and ensures your contributions are aligned with the team’s priorities.

### Clarifying technical terms

Issues often mention technical terms, code, or files that might not be immediately clear. You can use {% data variables.product.prodname_copilot_short %} to get explanations or context for these references. For example, you can ask about the purpose of a file or function, or the meaning of a specific term mentioned in the issue. This helps you understand the details without spending extra time searching through documentation or code.

### Getting suggestions for next steps

Once you understand the context of an issue, {% data variables.product.prodname_copilot_short %} can help you figure out how to move forward. You can ask for suggestions on how to approach the work, like fixing a bug or implementing a new feature. For example, you might ask, “What’s the best way to resolve this issue?” or “How can I start addressing this problem?” {% data variables.product.prodname_copilot_short %}'s suggestions can provide useful starting points, helping you plan your work more effectively.

{% endif %}

## Making decisions as a team

You can use issues and discussions to communicate and make decisions as a team on planned improvements or priorities for your project. Issues are useful when you create them for discussion of specific details, such as bug or performance reports, planning for the next quarter, or design for a new initiative. Discussions are useful for open-ended brainstorming or feedback, outside the codebase and across repositories. For more information, see "[AUTOTITLE](/get-started/using-github/communicating-on-github#which-discussion-tool-should-i-use)."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Before you submit your review, your line comments are _pending_ and only visible
You can use [{% data variables.product.prodname_github_codespaces %}](/codespaces/overview) to test, run, and review pull requests.

1. Open the pull request in a codespace, as described in "[AUTOTITLE](/codespaces/developing-in-codespaces/using-github-codespaces-for-pull-requests#opening-a-pull-request-in-codespaces)."
1. In the Activity Bar, click the **GitHub Pull Request** view. This view only appears when you open a pull request in a codespace.
1. In the Activity Bar, click the **{% data variables.product.github %} Pull Request** view. This view only appears when you open a pull request in a codespace.

![Screenshot of the {% data variables.product.prodname_vscode_shortname %} Activity Bar. The mouse pointer is hovering over an icon displaying the tooltip "{% data variables.product.prodname_dotcom %} Pull Request."](/assets/images/help/codespaces/github-pr-view.png)

Expand All @@ -79,6 +79,33 @@ For more information on reviewing pull requests in {% data variables.product.pro
{% endcodespaces %}
{% endif %}

{% webui %}
{% ifversion copilot %}

## Understanding changes in a pull request

> [!NOTE] {% data reusables.copilot.copilot-requires-subscription %}
{% data variables.product.prodname_copilot %} can help you quickly understand the changes in a pull request by providing context and explanations for specific commits. If you’re unsure about the purpose of a particular change or need more details about how it fits into the broader codebase, you can ask {% data variables.product.prodname_copilot_short %} questions about individual commits.

1. Navigate to a commit on {% data variables.product.github %}.

{% data reusables.copilot.open-copilot %}

1. At the bottom of the {% data variables.product.prodname_copilot_short %} chat panel, in the "Ask {% data variables.product.prodname_copilot_short %}" box, type a question and press <kbd>Enter</kbd>. For example, you could enter:

* `Summarize the changes in this commit`
* `Who committed these changes?`
* `When was this commit made?`

> [!TIP]
> If you know the SHA for a commit, instead of navigating to the commit, you can ask {% data variables.product.prodname_copilot_short %} about the commit from any page in the repository on {% data variables.product.github %} by including the SHA in your message. For example, `What changed in commit a778e0eab?`
{% data reusables.copilot.stop-response-generation %}

{% endif %}
{% endwebui %}

## Reviewing dependency changes

If the pull request contains changes to dependencies you can use the dependency review for a manifest or lock file to see what has changed and check whether the changes introduce security vulnerabilities. For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)."
Expand Down
3 changes: 1 addition & 2 deletions content/repositories/working-with-files/using-files/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ versions:
ghec: '*'
children:
- /navigating-code-on-github
- /viewing-a-file
- /viewing-and-understanding-files
- /getting-permanent-links-to-files
- /downloading-source-code-archives
- /working-with-non-code-files
---

Loading

0 comments on commit 3e3bb37

Please sign in to comment.