Merge branch 'main' into codewithdev-docs
16
.github/workflows/staging-deploy-pr.yml
vendored
@@ -323,13 +323,17 @@ jobs:
|
||||
name: pr_build
|
||||
path: ${{ runner.temp }}
|
||||
|
||||
- name: Extract user-changes to temp directory
|
||||
# For security reasons, only extract the tar from docs-internal
|
||||
# This allows us to add search indexes and early access content to the build
|
||||
- if: ${{ github.repository == 'github/docs-internal' }}
|
||||
name: Extract user-changes to temp directory
|
||||
run: |
|
||||
mkdir $RUNNER_TEMP/app
|
||||
tar -x --file=$RUNNER_TEMP/app.tar -C "$RUNNER_TEMP/app/"
|
||||
|
||||
# Move the LFS content into the temp directory in chunks (destructively)
|
||||
- name: Move the LFS objects
|
||||
- if: ${{ github.repository == 'github/docs-internal' }}
|
||||
name: Move the LFS objects
|
||||
run: |
|
||||
git lfs ls-files --name-only | xargs -n 1 -I {} sh -c 'mkdir -p "$RUNNER_TEMP/app/$(dirname {})"; mv {} "$RUNNER_TEMP/app/$(dirname {})/"'
|
||||
|
||||
@@ -341,9 +345,15 @@ jobs:
|
||||
mv content/early-access "$RUNNER_TEMP/app/content/"
|
||||
mv data/early-access "$RUNNER_TEMP/app/data/"
|
||||
|
||||
- name: Create a gzipped archive
|
||||
- if: ${{ github.repository == 'github/docs-internal' }}
|
||||
name: Create a gzipped archive (docs-internal)
|
||||
run: tar -cz --file app.tar.gz "$RUNNER_TEMP/app/"
|
||||
|
||||
# gzip the app.tar from github/docs so we're working with the same format
|
||||
- if: ${{ github.repository == 'github/docs' }}
|
||||
name: Create a gzipped archive (docs)
|
||||
run: gzip -9 < "$RUNNER_TEMP/app.tar" > app.tar.gz
|
||||
|
||||
- name: Create a Heroku build source
|
||||
id: build-source
|
||||
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
|
||||
|
||||
72
.github/workflows/transfer-to-localization-repo.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
name: Copy to REST API issue to docs-content
|
||||
|
||||
# **What it does**: Copies an issue in the open source repo to the docs-content repo, comments on and closes the original issue
|
||||
# **Why we have it**: REST API updates cannot be made in the open source repo. Instead, we copy the issue to an internal issue (we do not transfer so that the issue does not disappear for the contributor) and close the original issue.
|
||||
# **Who does it impact**: Open source and docs-content maintainers
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- labeled
|
||||
|
||||
jobs:
|
||||
transfer-issue:
|
||||
name: Transfer issue
|
||||
runs-on: ubuntu-latest
|
||||
if: (github.event.label.name == 'localization ' && github.repository == 'github/docs')
|
||||
steps:
|
||||
- name: Check if this run was triggered by a member of the docs team
|
||||
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
|
||||
id: triggered-by-member
|
||||
with:
|
||||
github-token: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
|
||||
result-encoding: string
|
||||
script: |
|
||||
const triggerer_login = context.payload.sender.login
|
||||
const teamMembers = await github.request(
|
||||
`/orgs/github/teams/docs/members?per_page=100`
|
||||
)
|
||||
const logins = teamMembers.data.map(member => member.login)
|
||||
if (logins.includes(triggerer_login)) {
|
||||
console.log(`This workflow was triggered by ${triggerer_login} (on the docs team).`)
|
||||
return 'true'
|
||||
}
|
||||
console.log(`This workflow was triggered by ${triggerer_login} (not on the docs team), so no action will be taken.`)
|
||||
return 'false'
|
||||
|
||||
- name: Exit if not triggered by a docs team member
|
||||
if: steps.triggered-by-member.outputs.result == 'false'
|
||||
run: |
|
||||
echo Aborting. This workflow must be triggered by a member of the docs team.
|
||||
exit 1
|
||||
|
||||
- name: Create an issue in the localization repo
|
||||
run: |
|
||||
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/localization)"
|
||||
echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
|
||||
ISSUE_TITLE: ${{ github.event.issue.title }}
|
||||
ISSUE_BODY: ${{ github.event.issue.body }}
|
||||
|
||||
- name: Comment on the new issue
|
||||
run: gh issue comment $NEW_ISSUE --body "This issue was originally opened in the open source repo as $OLD_ISSUE"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
|
||||
NEW_ISSUE: ${{ env.NEW_ISSUE }}
|
||||
OLD_ISSUE: ${{ github.event.issue.html_url }}
|
||||
|
||||
- name: Comment on the old issue
|
||||
run: gh issue comment $OLD_ISSUE --body "Thank you for opening this issue! Updates to translated content must be made internally. I have copied your issue to an internal issue, so I will close this issue."
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
|
||||
OLD_ISSUE: ${{ github.event.issue.html_url }}
|
||||
|
||||
- name: Close the old issue
|
||||
run: gh issue close $OLD_ISSUE
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
|
||||
OLD_ISSUE: ${{ github.event.issue.html_url }}
|
||||
@@ -13,6 +13,7 @@ COPY --chown=node:node package-lock.json /openapi-check
|
||||
ADD --chown=node:node script /openapi-check/script
|
||||
ADD --chown=node:node lib /openapi-check/lib
|
||||
ADD --chown=node:node content /openapi-check/content
|
||||
ADD --chown=node:node data /openapi-check/data
|
||||
|
||||
RUN npm ci -D
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 221 KiB |
|
After Width: | Height: | Size: 188 KiB |
BIN
assets/images/help/pages/verify-add-domain.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
assets/images/help/pages/verify-button.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
assets/images/help/pages/verify-continue.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
assets/images/help/pages/verify-dns.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
assets/images/help/pages/verify-enter-domain.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/images/help/settings/org-settings-pages.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
assets/images/help/settings/user-settings-pages.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
assets/images/help/support/account-field.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
assets/images/help/support/from-field.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
assets/images/help/support/priority-field.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
assets/images/help/support/product-field.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
assets/images/help/support/release-field.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -1,3 +1,7 @@
|
||||
.header {
|
||||
.breadcrumbs {
|
||||
clip-path: inset(-5px -5px -5px 0px);
|
||||
}
|
||||
|
||||
.header {
|
||||
display: unset;
|
||||
}
|
||||
|
||||
@@ -41,24 +41,24 @@ export const Header = () => {
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`${
|
||||
scroll
|
||||
? cx(
|
||||
styles.header,
|
||||
'border-bottom color-border-muted no-print position-sticky top-0 z-3 color-shadow-medium color-bg-default'
|
||||
)
|
||||
: 'border-bottom color-border-muted no-print position-sticky top-0 z-3 color-shadow-small'
|
||||
}`}
|
||||
className={cx(
|
||||
'border-bottom d-unset color-border-muted no-print z-3 color-bg-default',
|
||||
styles.header
|
||||
)}
|
||||
>
|
||||
{error !== '404' && <HeaderNotifications />}
|
||||
|
||||
<header className={cx('container-xl px-3 px-md-6 pt-3 pb-3 z-3')}>
|
||||
<header
|
||||
className={cx(
|
||||
'color-bg-default px-3 px-md-6 pt-3 pb-3 position-sticky top-0 z-3',
|
||||
scroll ? 'color-shadow-medium' : 'color-shadow-small'
|
||||
)}
|
||||
>
|
||||
{/* desktop header */}
|
||||
<div
|
||||
className="d-none d-lg-flex flex-justify-end flex-items-center"
|
||||
data-testid="desktop-header"
|
||||
>
|
||||
<div className="mr-auto">
|
||||
<div className={cx('mr-auto', scroll && styles.breadcrumbs)}>
|
||||
<Breadcrumbs />
|
||||
</div>
|
||||
{showVersionPicker && (
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
.fadeBottom {
|
||||
background: linear-gradient(to top, var(--color-canvas-default), transparent);
|
||||
}
|
||||
|
||||
/* Because of the sticky header */
|
||||
.hashAnchor {
|
||||
&:target {
|
||||
scroll-margin-top: 75px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { ArrowRightIcon } from '@primer/octicons-react'
|
||||
import { useState } from 'react'
|
||||
import { FeaturedTrack } from 'components/context/ProductSubLandingContext'
|
||||
import { TruncateLines } from 'components/ui/TruncateLines'
|
||||
import slugger from 'github-slugger'
|
||||
import styles from './LearningTrack.module.scss'
|
||||
|
||||
type Props = {
|
||||
@@ -17,6 +18,7 @@ export const LearningTrack = ({ track }: Props) => {
|
||||
setNumVisible(track?.guides?.length || 0)
|
||||
}
|
||||
const { t } = useTranslation('product_sublanding')
|
||||
const slug = track?.title ? slugger.slug(track?.title) : ''
|
||||
|
||||
return (
|
||||
<div data-testid="learning-track" className="my-3 px-4 col-12 col-md-6">
|
||||
@@ -24,7 +26,11 @@ export const LearningTrack = ({ track }: Props) => {
|
||||
<div className="Box-header color-bg-subtle p-4 d-flex flex-1 flex-items-start flex-wrap">
|
||||
<div className="d-flex flex-auto flex-items-start col-8 col-md-12 col-xl-8">
|
||||
<div className="my-xl-0 mr-xl-3">
|
||||
<h5 className="mb-3 color-text f3 text-semibold">{track?.title}</h5>
|
||||
<h5 id={slug} className={cx('mb-3 color-text f3 text-semibold', styles.hashAnchor)}>
|
||||
<a className="color-unset" href={`#${slug}`}>
|
||||
{track?.title}
|
||||
</a>
|
||||
</h5>
|
||||
<TruncateLines as="p" maxLines={3} className="color-text">
|
||||
{track?.description}
|
||||
</TruncateLines>
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
&:target {
|
||||
scroll-margin-top: 75px;
|
||||
}
|
||||
}
|
||||
|
||||
[class~="note"],
|
||||
|
||||
@@ -154,7 +154,7 @@ You can disable some of the badges for {% data variables.product.prodname_dotcom
|
||||
|
||||
## List of qualifying repositories for Mars 2020 Helicopter Contributor badge
|
||||
|
||||
If you authored any commit(s) present in the commit history for the listed tag of one or more of the repositories below, you'll receive the Mars 2020 Helicopter Contributor badge on your profile. The authored commit must be with a verified email address, associated with your account at the time {% data variables.product.prodname_dotcom %} determined the eligible contributions, in order to be attributed to you. You can be the original author or [one of the co-authors](/github/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors) of the commit. Future changes to verified emails will not have an effect on the badge. We built the list based on information received from NASA's Jet Propulsion Laboratory.
|
||||
If you authored any commit(s) present in the commit history for the listed tag of one or more of the repositories below, you'll receive the Mars 2020 Helicopter Contributor badge on your profile. The authored commit must be with a verified email address, associated with your account at the time {% data variables.product.prodname_dotcom %} determined the eligible contributions, in order to be attributed to you. You can be the original author or [one of the co-authors](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors) of the commit. Future changes to verified emails will not have an effect on the badge. We built the list based on information received from NASA's Jet Propulsion Laboratory.
|
||||
|
||||
| {% data variables.product.prodname_dotcom %} Repository | Version | Tag |
|
||||
|---|---|---|
|
||||
|
||||
@@ -88,5 +88,5 @@ After changing your username, links to your previous profile page, such as `http
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Why are my commits linked to the wrong user?](/articles/why-are-my-commits-linked-to-the-wrong-user)"{% ifversion fpt or ghec %}
|
||||
- "[Why are my commits linked to the wrong user?](/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user)"{% ifversion fpt or ghec %}
|
||||
- "[{% data variables.product.prodname_dotcom %} Username Policy](/free-pro-team@latest/github/site-policy/github-username-policy)"{% endif %}
|
||||
|
||||
@@ -68,18 +68,18 @@ Collaborators can also perform the following actions.
|
||||
|
||||
| Action | More information |
|
||||
| :- | :- |
|
||||
| Fork the repository | "[About forks](/github/collaborating-with-issues-and-pull-requests/about-forks)" |{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %}
|
||||
| Fork the repository | "[About forks](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)" |{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %}
|
||||
| Rename a branch other than the default branch | "[Renaming a branch](/github/administering-a-repository/renaming-a-branch)" |{% endif %}
|
||||
| Create, edit, and delete comments on commits, pull requests, and issues in the repository | <ul><li>"[About issues](/github/managing-your-work-on-github/about-issues)"</li><li>"[Commenting on a pull request](/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request)"</li><li>"[Managing disruptive comments](/communities/moderating-comments-and-conversations/managing-disruptive-comments)"</li></ul> |
|
||||
| Create, edit, and delete comments on commits, pull requests, and issues in the repository | <ul><li>"[About issues](/github/managing-your-work-on-github/about-issues)"</li><li>"[Commenting on a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)"</li><li>"[Managing disruptive comments](/communities/moderating-comments-and-conversations/managing-disruptive-comments)"</li></ul> |
|
||||
| Create, assign, close, and re-open issues in the repository | "[Managing your work with issues](/github/managing-your-work-on-github/managing-your-work-with-issues)" |
|
||||
| Manage labels for issues and pull requests in the repository | "[Labeling issues and pull requests](/github/managing-your-work-on-github/labeling-issues-and-pull-requests)" |
|
||||
| Manage milestones for issues and pull requests in the repository | "[Creating and editing milestones for issues and pull requests](/github/managing-your-work-on-github/creating-and-editing-milestones-for-issues-and-pull-requests)" |
|
||||
| Mark an issue or pull request in the repository as a duplicate | "[About duplicate issues and pull requests](/github/managing-your-work-on-github/about-duplicate-issues-and-pull-requests)" |
|
||||
| Create, merge, and close pull requests in the repository | "[Proposing changes to your work with pull requests](/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests)" |{% ifversion fpt or ghae or ghes > 3.0 or ghec %}
|
||||
| Enable and disable auto-merge for a pull request | "[Automatically merging a pull request](/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request)"{% endif %}
|
||||
| Apply suggested changes to pull requests in the repository |"[Incorporating feedback in your pull request](/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request)" |
|
||||
| Enable and disable auto-merge for a pull request | "[Automatically merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)"{% endif %}
|
||||
| Apply suggested changes to pull requests in the repository |"[Incorporating feedback in your pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)" |
|
||||
| Create a pull request from a fork of the repository | "[Creating a pull request from a fork](/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)" |
|
||||
| Submit a review on a pull request that affects the mergeability of the pull request | "[Reviewing proposed changes in a pull request](/github/collaborating-with-issues-and-pull-requests/reviewing-proposed-changes-in-a-pull-request)" |
|
||||
| Submit a review on a pull request that affects the mergeability of the pull request | "[Reviewing proposed changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)" |
|
||||
| Create and edit a wiki for the repository | "[About wikis](/communities/documenting-your-project-with-wikis/about-wikis)" |
|
||||
| Create and edit releases for the repository | "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository)" |
|
||||
| Act as a code owner for the repository | "[About code owners](/articles/about-code-owners)" |{% ifversion fpt or ghae or ghec %}
|
||||
|
||||
@@ -96,9 +96,9 @@ jobs:
|
||||
with:
|
||||
role-to-assume: arn:aws:iam::1234567890:role/example-role
|
||||
role-session-name: samplerolesession
|
||||
aws-region: ${{ env.AWS_REGION }}
|
||||
aws-region: {% raw %}${{ env.AWS_REGION }}{% endraw %}
|
||||
# Upload a file to AWS s3
|
||||
- name: Copy index.html to s3
|
||||
run: |
|
||||
aws s3 cp ./index.html s3://${{ env.BUCKET_NAME }}/
|
||||
aws s3 cp ./index.html s3://{% raw %}${{ env.BUCKET_NAME }}{% endraw %}/
|
||||
```
|
||||
|
||||
@@ -808,7 +808,15 @@ on:
|
||||
|
||||
{% data reusables.webhooks.workflow_run_desc %}
|
||||
|
||||
{% data reusables.github-actions.branch-requirement %}
|
||||
{% note %}
|
||||
|
||||
**Notes:**
|
||||
|
||||
* This event will only trigger a workflow run if the workflow file is on the default branch.
|
||||
|
||||
* You can't use `workflow_run` to chain together more than three levels of workflows. For example, if you attempt to trigger five workflows (named `B` to `F`) to run sequentially after an initial workflow `A` has run (that is: `A` → `B` → `C` → `D` → `E` → `F`), workflows `E` and `F` will not be run.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
|
||||
| --------------------- | -------------- | ------------ | -------------|
|
||||
|
||||
@@ -182,7 +182,7 @@ The filter determines if a workflow should run by evaluating the changed files a
|
||||
|
||||
Diffs are limited to 300 files. If there are files changed that aren't matched in the first 300 files returned by the filter, the workflow will not run. You may need to create more specific filters so that the workflow will run automatically.
|
||||
|
||||
For more information, see "[About comparing branches in pull requests](/articles/about-comparing-branches-in-pull-requests)."
|
||||
For more information, see "[About comparing branches in pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-comparing-branches-in-pull-requests)."
|
||||
|
||||
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
|
||||
## `on.workflow_call.inputs`
|
||||
|
||||
@@ -47,7 +47,7 @@ For more information, see "[About {% data variables.contact.premium_support %} f
|
||||
## Contacting {% data variables.contact.enterprise_support %}
|
||||
|
||||
{% ifversion ghes %}
|
||||
{% data reusables.support.zendesk-deprecation %}
|
||||
{% data reusables.support.zendesk-old-tickets %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ If you're uncertain if the issue is out of scope, open a ticket and we're happy
|
||||
|
||||
## Contacting {% data variables.contact.enterprise_support %}
|
||||
|
||||
{% data reusables.support.zendesk-deprecation %}
|
||||
{% data reusables.support.zendesk-old-tickets %}
|
||||
|
||||
You can contact {% data variables.contact.enterprise_support %} through the {% data variables.contact.contact_enterprise_portal %} for help with:
|
||||
- Installing and using {% data variables.product.prodname_advanced_security %}
|
||||
|
||||
@@ -18,24 +18,22 @@ Though we'll do our best to respond to automated support requests, we typically
|
||||
|
||||
## Contacting {% data variables.contact.enterprise_support %}
|
||||
|
||||
{% data reusables.support.zendesk-deprecation %}
|
||||
{% data reusables.support.zendesk-old-tickets %}
|
||||
|
||||
{% data variables.contact.enterprise_support %} customers can open a support ticket using the {% ifversion ghes %}{% data variables.product.prodname_ghe_server %} {% data variables.enterprise.management_console %} or the {% data variables.contact.contact_enterprise_portal %}{% elsif ghae %} the {% data variables.contact.contact_ae_portal %}{% endif %}. Mark the ticket's priority as {% data variables.product.support_ticket_priority_urgent %}, {% data variables.product.support_ticket_priority_high %}, {% data variables.product.support_ticket_priority_normal %}, or {% data variables.product.support_ticket_priority_low %}. For more information, see "[Assigning a priority to a support ticket](/enterprise/admin/guides/enterprise-support/about-github-enterprise-support#assigning-a-priority-to-a-support-ticket)" and "[Submitting a ticket](/enterprise/admin/guides/enterprise-support/submitting-a-ticket)."
|
||||
|
||||
## Contacting {% data variables.contact.enterprise_support %}
|
||||
{% data variables.contact.enterprise_support %} customers can open a support ticket using the {% ifversion ghes %}{% data variables.product.prodname_ghe_server %} {% data variables.enterprise.management_console %} or the {% data variables.contact.contact_enterprise_portal %}{% elsif ghae %} the {% data variables.contact.contact_ae_portal %}{% endif %}. For more information, see "[Submitting a ticket](/enterprise/admin/guides/enterprise-support/submitting-a-ticket)."
|
||||
|
||||
{% ifversion ghes %}
|
||||
|
||||
## Contacting {% data variables.contact.premium_support %}
|
||||
|
||||
{% data variables.contact.enterprise_support %} customers can open a support ticket using the {% data variables.product.prodname_ghe_server %} {% data variables.enterprise.management_console %} or the {% data variables.contact.contact_enterprise_portal %}. Mark its priority as {% data variables.product.support_ticket_priority_urgent %}, {% data variables.product.support_ticket_priority_high %}, {% data variables.product.support_ticket_priority_normal %}, or {% data variables.product.support_ticket_priority_low %}. For more information, see "[Assigning a priority to a support ticket](/enterprise/admin/guides/enterprise-support/about-github-premium-support-for-github-enterprise-server#assigning-a-priority-to-a-support-ticket)" and "[Submitting a ticket](/enterprise/admin/guides/enterprise-support/submitting-a-ticket)."
|
||||
|
||||
### Viewing past support tickets
|
||||
|
||||
You can use the {% data variables.contact.enterprise_portal %} to view past support tickets.
|
||||
|
||||
1. Navigate to the {% data variables.contact.contact_enterprise_portal %}.
|
||||
2. Click **My tickets**.
|
||||

|
||||
|
||||
## Contacting {% data variables.contact.premium_support %}
|
||||
|
||||
{% data variables.contact.enterprise_support %} customers can open a support ticket using the {% data variables.product.prodname_ghe_server %} {% data variables.enterprise.management_console %} or the {% data variables.contact.contact_enterprise_portal %}. Mark its priority as {% data variables.product.support_ticket_priority_urgent %}, {% data variables.product.support_ticket_priority_high %}, {% data variables.product.support_ticket_priority_normal %}, or {% data variables.product.support_ticket_priority_low %}. For more information, see "[Assigning a priority to a support ticket](/enterprise/admin/guides/enterprise-support/about-github-premium-support-for-github-enterprise-server#assigning-a-priority-to-a-support-ticket)" and "[Submitting a ticket](/enterprise/admin/guides/enterprise-support/submitting-a-ticket)."
|
||||
|
||||
{% endif %}
|
||||
## Contacting sales
|
||||
|
||||
@@ -27,26 +27,14 @@ After submitting your support request and optional diagnostic information, {% da
|
||||
|
||||
## Submitting a ticket using the {% data variables.contact.enterprise_portal %}
|
||||
|
||||
{% data reusables.support.zendesk-deprecation %}
|
||||
{% data reusables.support.zendesk-old-tickets %}
|
||||
|
||||
1. Navigate to the {% data variables.contact.contact_enterprise_portal %}.
|
||||
5. Click **Submit a Ticket**
|
||||

|
||||
{% data reusables.enterprise_enterprise_support.submit-support-ticket-first-section %}
|
||||
{% data reusables.enterprise_enterprise_support.submit-support-ticket-second-section %}
|
||||
To submit a ticket about {% data variables.product.product_location_enterprise %}, you must be an owner, billing manager, or member with support entitlement. For more information, see "[Managing support entitlements for your enterprise](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise)."
|
||||
|
||||
## Submitting a ticket using your enterprise account
|
||||
If you cannot sign in to your account on {% data variables.product.prodname_dotcom_the_website %} or do not have support entitlement, you can still submit a ticket by providing your license or a diagnostics file from your server.
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise-on-dotcom %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
3. In the left sidebar, click **Enterprise licensing**.
|
||||

|
||||
4. Under "{% data variables.product.prodname_enterprise %} Help", click **{% data variables.contact.enterprise_support %} Portal**.
|
||||

|
||||
5. Click **Submit a Ticket**
|
||||

|
||||
{% data reusables.enterprise_enterprise_support.submit-support-ticket-first-section %}
|
||||
{% data reusables.enterprise_enterprise_support.submit-support-ticket-second-section %}
|
||||
1. Navigate to the {% data variables.contact.contact_support_portal %}.
|
||||
{% data reusables.support.submit-a-ticket %}
|
||||
|
||||
## Submitting a ticket using the {% data variables.product.product_name %} {% data variables.enterprise.management_console %}
|
||||
|
||||
@@ -56,15 +44,9 @@ After submitting your support request and optional diagnostic information, {% da
|
||||
{% data reusables.enterprise_management_console.support-link %}
|
||||
5. If you'd like to include diagnostics with your support ticket, Under "Diagnostics", click **Download diagnostic info** and save the file locally. You'll attach this file to your support ticket later.
|
||||

|
||||
6. Under "Open Support Request", click **New support request**.
|
||||
6. To complete your ticket and display the {% data variables.contact.enterprise_portal %}, under "Open Support Request", click **New support request**.
|
||||

|
||||
5. Click **Submit a Ticket**
|
||||

|
||||
{% data reusables.enterprise_enterprise_support.submit-support-ticket-first-section %}
|
||||
14. To include diagnostics with your support ticket, click **Add file**, then attach the diagnostics file you downloaded.
|
||||

|
||||
{% data reusables.enterprise_enterprise_support.submit-support-ticket-second-section %}
|
||||
7. Click **Submit**.
|
||||
{% data reusables.support.submit-a-ticket %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@ shortTitle: Enable Packages with MinIO
|
||||
- Make sure to configure the bucket you'll want to use in the future. We do not recommend changing your storage after you start using {% data variables.product.prodname_registry %}.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before you can enable and configure {% data variables.product.prodname_registry %} on {% data variables.product.product_location_enterprise %}, you need to prepare your MinIO storage bucket. To help you quickly set up a MinIO bucket and navigate MinIO's customization options, see the "[Quickstart for configuring your MinIO storage bucket for {% data variables.product.prodname_registry %}](/admin/packages/quickstart-for-configuring-your-minio-storage-bucket-for-github-packages)."
|
||||
|
||||
Ensure your MinIO external storage access key ID and secret have these permissions:
|
||||
|
||||
@@ -6,8 +6,9 @@ redirect_from:
|
||||
- /enterprise/admin/articles/determining-whether-a-user-account-is-dormant/
|
||||
- /enterprise/admin/user-management/managing-dormant-users
|
||||
- /admin/user-management/managing-dormant-users
|
||||
intro: 'A user account is considered to be dormant if it has not been active for at least a month.{% ifversion ghes %} You may choose to suspend dormant users to free up user licenses.{% endif %}'
|
||||
intro: '{% data reusables.enterprise-accounts.dormant-user-activity-threshold %}'
|
||||
versions:
|
||||
ghec: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
type: how_to
|
||||
@@ -16,16 +17,12 @@ topics:
|
||||
- Enterprise
|
||||
- Licensing
|
||||
---
|
||||
"Activity" includes, but is not limited to:
|
||||
- Signing in to {% data variables.product.product_name %}.
|
||||
- Commenting on issues and pull requests.
|
||||
- Creating, deleting, watching, and starring repositories.
|
||||
- Pushing commits.{% ifversion ghes or ghae %}
|
||||
- Accessing resources by using a personal access token or SSH key.{% endif %}
|
||||
{% data reusables.enterprise-accounts.dormant-user-activity %}
|
||||
|
||||
{% ifversion ghes or ghae%}
|
||||
## Viewing dormant users
|
||||
|
||||
You can view a list of all dormant users who have not been suspended and who are not site administrators.
|
||||
{% data reusables.enterprise-accounts.viewing-dormant-users %}
|
||||
|
||||
{% data reusables.enterprise_site_admin_settings.access-settings %}
|
||||
3. In the left sidebar, click **Dormant users**.
|
||||
@@ -47,11 +44,29 @@ You can view a list of all dormant users who have not been suspended and who are
|
||||
{% data reusables.enterprise_site_admin_settings.dormancy-threshold %}
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% ifversion ghes or ghae %}
|
||||
{% data reusables.enterprise-accounts.policies-tab %}
|
||||
{% else %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% endif %}
|
||||
{% data reusables.enterprise-accounts.options-tab %}
|
||||
4. Under "Dormancy threshold", use the drop-down menu, and click the desired dormancy threshold.
|
||||

|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion ghec %}
|
||||
|
||||
{% data reusables.enterprise-accounts.dormant-user-release-phase %}
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Note:** During the private beta, ongoing improvements to the report download feature may limit its availability.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
## Downloading the dormant users report from your enterprise account
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.enterprise-accounts-compliance-tab %}
|
||||
1. To download your Dormant Users (beta) report as a CSV file, under "Other", click {% octicon "download" aria-label="The Download icon" %} **Download**.
|
||||

|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -38,6 +38,10 @@ You can view {% ifversion ghec %}all the {% data variables.product.prodname_ghe_
|
||||
{% ifversion ghec %}1. Optionally, to view a list of pending invitations, click **_NUMBER_ pending**.
|
||||
{% endif %}
|
||||
|
||||
## Viewing dormant users
|
||||
|
||||
You can view a list of all dormant users {% ifversion ghes or ghae %} who have not been suspended and {% endif %}who are not site administrators. {% data reusables.enterprise-accounts.dormant-user-activity-threshold %} For more information, see "[Managing dormant users](/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users)."
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Roles in an enterprise](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise)"
|
||||
|
||||
@@ -103,19 +103,19 @@ Action | Description
|
||||
|
||||
| Action | Description |
|
||||
| :- | :- |{% ifversion ghes > 3.1 or ghae-next %}
|
||||
| `pull_request.create` | A pull request was created. For more information, see "[Creating a pull request](/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)." |
|
||||
| `pull_request.close` | A pull request was closed without being merged. For more information, see "[Closing a pull request](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/closing-a-pull-request)." |
|
||||
| `pull_request.create` | A pull request was created. For more information, see "[Creating a pull request](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)." |
|
||||
| `pull_request.close` | A pull request was closed without being merged. For more information, see "[Closing a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/closing-a-pull-request)." |
|
||||
| `pull_request.reopen` | A pull request was reopened after previously being closed. |
|
||||
| `pull_request.merge` | A pull request was merged. For more information, see "[Merging a pull request](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)." |
|
||||
| `pull_request.merge` | A pull request was merged. For more information, see "[Merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)." |
|
||||
| `pull_request.indirect_merge` | A pull request was considered merged because the pull request's commits were merged into the target branch. |
|
||||
| `pull_request.ready_for_review` | A pull request was marked as ready for review. For more information, see "[Changing the stage of a pull request](/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review)." |
|
||||
| `pull_request.converted_to_draft` | A pull request was converted to a draft. For more information, see "[Changing the stage of a pull request](/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft)." |
|
||||
| `pull_request.create_review_request` | A review was requested on a pull request. For more information, see "[About pull request reviews](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)." |
|
||||
| `pull_request.remove_review_request` | A review request was removed from a pull request. For more information, see "[About pull request reviews](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)." |
|
||||
| `pull_request_review.submit` | A review was submitted for a pull request. For more information, see "[About pull request reviews](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)." |
|
||||
| `pull_request_review.dismiss` | A review on a pull request was dismissed. For more information, see "[Dismissing a pull request review](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review)." |
|
||||
| `pull_request.create_review_request` | A review was requested on a pull request. For more information, see "[About pull request reviews](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)." |
|
||||
| `pull_request.remove_review_request` | A review request was removed from a pull request. For more information, see "[About pull request reviews](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)." |
|
||||
| `pull_request_review.submit` | A review was submitted for a pull request. For more information, see "[About pull request reviews](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)." |
|
||||
| `pull_request_review.dismiss` | A review on a pull request was dismissed. For more information, see "[Dismissing a pull request review](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review)." |
|
||||
| `pull_request_review.delete` | A review on a pull request was deleted. |
|
||||
| `pull_request_review_comment.create` | A review comment was added to a pull request. For more information, see "[About pull request reviews](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)." |
|
||||
| `pull_request_review_comment.create` | A review comment was added to a pull request. For more information, see "[About pull request reviews](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)." |
|
||||
| `pull_request_review_comment.update` | A review comment on a pull request was changed. |{% endif %}
|
||||
| `pull_request_review_comment.delete` | A review comment on a pull request was deleted. |
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ You can replace `pull_request` with `pull_request_target`, which is used for pul
|
||||
name: Dependabot Workflow
|
||||
on:
|
||||
pull_request_target
|
||||
|
||||
|
||||
permissions:
|
||||
# Downscope as necessary, since you now have a read-write token
|
||||
|
||||
@@ -120,7 +120,7 @@ name: Dependabot Trusted Workflow
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Dependabot Untrusted Workflow"]
|
||||
types:
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
@@ -244,7 +244,7 @@ jobs:
|
||||
|
||||
### Enable auto-merge on a pull request
|
||||
|
||||
If you want to auto-merge your pull requests, you can use {% data variables.product.prodname_dotcom %}'s auto-merge functionality. This enables the pull request to be merged when all required tests and approvals are successfully met. For more information on auto-merge, see "[Automatically merging a pull request"](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)."
|
||||
If you want to auto-merge your pull requests, you can use {% data variables.product.prodname_dotcom %}'s auto-merge functionality. This enables the pull request to be merged when all required tests and approvals are successfully met. For more information on auto-merge, see "[Automatically merging a pull request"](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)."
|
||||
|
||||
Here is an example of enabling auto-merge for all patch updates to `my-dependency`:
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ You can disable {% data variables.product.prodname_dependabot_security_updates %
|
||||
|
||||
| Automatic enablement prerequisite | More information |
|
||||
| ----------------- | ----------------------- |
|
||||
| Repository is not a fork | "[About forks](/github/collaborating-with-issues-and-pull-requests/about-forks)" |
|
||||
| Repository is not a fork | "[About forks](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)" |
|
||||
| Repository is not archived | "[Archiving repositories](/github/creating-cloning-and-archiving-repositories/archiving-repositories)" |
|
||||
| Repository is public, or repository is private and you have enabled read-only analysis by {% data variables.product.prodname_dotcom %}, dependency graph, and vulnerability alerts in the repository's settings | "[Managing data use settings for your private repository](/github/understanding-how-github-uses-and-protects-your-data/managing-data-use-settings-for-your-private-repository)." |
|
||||
| Repository contains dependency manifest file from a package ecosystem that {% data variables.product.prodname_dotcom %} supports | "[Supported package ecosystems](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph#supported-package-ecosystems)" |
|
||||
|
||||
@@ -30,7 +30,7 @@ If a pull request targets your repository's default branch and contains changes
|
||||
{% ifversion fpt or ghec %}
|
||||
Dependency review is available in:
|
||||
|
||||
* All public repositories.
|
||||
* All public repositories.
|
||||
* Private repositories owned by organizations with an {% data variables.product.prodname_advanced_security %} license that have the dependency graph enabled. For more information, see "[Exploring the dependencies of a repository](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)."
|
||||
{% elsif ghes or ghae %}
|
||||
Dependency review is available when dependency graph is enabled for {% data variables.product.product_location %} and {% data variables.product.prodname_advanced_security %} is enabled for the organization or repository.
|
||||
@@ -38,7 +38,7 @@ Dependency review is available when dependency graph is enabled for {% data vari
|
||||
|
||||
Sometimes you might just want to update the version of one dependency in a manifest and generate a pull request. However, if the updated version of this direct dependency also has updated dependencies, your pull request may have more changes than you expected. The dependency review for each manifest and lock file provides an easy way to see what has changed, and whether any of the new dependency versions contain known vulnerabilities.
|
||||
|
||||
By checking the dependency reviews in a pull request, and changing any dependencies that are flagged as vulnerable, you can avoid vulnerabilities being added to your project. For more information about how dependency review works, see "[Reviewing dependency changes in a pull request](/github/collaborating-with-issues-and-pull-requests/reviewing-dependency-changes-in-a-pull-request)."
|
||||
By checking the dependency reviews in a pull request, and changing any dependencies that are flagged as vulnerable, you can avoid vulnerabilities being added to your project. For more information about how dependency review works, see "[Reviewing dependency changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)."
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %} will find vulnerabilities that are already in your dependencies, but it's much better to avoid introducing potential problems than to fix problems at a later date. For more information about {% data variables.product.prodname_dependabot_alerts %}, see "[About alerts for vulnerable dependencies](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies#dependabot-alerts-for-vulnerable-dependencies)."
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ You can use the dependency graph to:
|
||||
- Explore the repositories your code depends on{% ifversion fpt or ghec %}, and those that depend on it{% endif %}. For more information, see "[Exploring the dependencies of a repository](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository)." {% ifversion fpt or ghec %}
|
||||
- View a summary of the dependencies used in your organization's repositories in a single dashboard. For more information, see "[Viewing insights for your organization](/articles/viewing-insights-for-your-organization#viewing-organization-dependency-insights)."{% endif %}
|
||||
- View and update vulnerable dependencies for your repository. For more information, see "[About alerts for vulnerable dependencies](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)."{% ifversion fpt or ghes > 3.1 or ghec %}
|
||||
- See information about vulnerable dependencies in pull requests. For more information, see "[Reviewing dependency changes in a pull request](/github/collaborating-with-issues-and-pull-requests/reviewing-dependency-changes-in-a-pull-request)."{% endif %}
|
||||
- See information about vulnerable dependencies in pull requests. For more information, see "[Reviewing dependency changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)."{% endif %}
|
||||
|
||||
## Enabling the dependency graph
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ topics:
|
||||
- Set up
|
||||
- Fundamentals
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
shortTitle: Personalize your account
|
||||
shortTitle: Personalize your codespaces
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ topics:
|
||||
|
||||
{% data variables.product.prodname_codespaces %} provides you with the full development experience of {% data variables.product.prodname_vscode %}. {% data reusables.codespaces.use-visual-studio-features %}
|
||||
|
||||
{% data reusables.codespaces.links-to-get-started %}
|
||||
|
||||

|
||||
|
||||
1. Side Bar - By default, this area shows your project files in the Explorer.
|
||||
|
||||
@@ -19,7 +19,7 @@ shortTitle: Forward ports
|
||||
|
||||
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on a particular port in your codespace, you can forward that port. This allows you to access the application from the browser on your local machine for testing and debugging.
|
||||
|
||||
When an application running inside a codespace prints output to the terminal that contains a localhost URL, such as `http://localhost:PORT` or `http://127.0.0.1:PORT`, the port is automatically forwarded. If you're using {% data variables.product.prodname_github_codespaces %} in the browser or in {% data variable.product.prodname_vscode %}, the URL string in the terminal is converted into a link that you can click to view the web page on your local machine. By default, {% data variables.product.prodname_codespaces %} forwards ports using HTTP.
|
||||
When an application running inside a codespace prints output to the terminal that contains a localhost URL, such as `http://localhost:PORT` or `http://127.0.0.1:PORT`, the port is automatically forwarded. If you're using {% data variables.product.prodname_codespaces %} in the browser or in {% data variables.product.prodname_vscode %}, the URL string in the terminal is converted into a link that you can click to view the web page on your local machine. By default, {% data variables.product.prodname_codespaces %} forwards ports using HTTP.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -18,10 +18,17 @@ shortTitle: Visual Studio Code
|
||||
---
|
||||
|
||||
|
||||
## About {% data variables.product.prodname_codespaces %} in {% data variables.product.prodname_vscode %}
|
||||
|
||||
You can use your local install of {% data variables.product.prodname_vscode %} to create, manage, work in, and delete codespaces. To use {% data variables.product.prodname_codespaces %} in {% data variables.product.prodname_vscode %}, you need to install the {% data variables.product.prodname_github_codespaces %} extension. For more information on setting up Codespaces in {% data variables.product.prodname_vscode %}, see "[Prerequisites](#prerequisites)."
|
||||
|
||||
By default, if you create a new codespace on {% data variables.product.prodname_dotcom_the_website %}, it will open in the browser. If you would prefer to open any new codespaces in {% data variables.product.prodname_vscode %} automatically, you can set your default editor to be {% data variables.product.prodname_vscode %}. For more information, see "[Setting your default editor for {% data variables.product.prodname_codespaces %}](/codespaces/managing-your-codespaces/setting-your-default-editor-for-codespaces)."
|
||||
|
||||
If you prefer to work in the browser, but want to continue using your existing {% data variables.product.prodname_vscode %} extensions, themes, and shortcuts, you can turn on Settings Sync. For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-codespaces-for-your-account#settings-sync)."
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To develop in a codespace directly in {% data variables.product.prodname_vscode %}, you must sign into the {% data variables.product.prodname_github_codespaces %} extension. The {% data variables.product.prodname_github_codespaces %} extension requires {% data variables.product.prodname_vscode %} October 2020 Release 1.51 or later.
|
||||
To develop in a codespace directly in {% data variables.product.prodname_vscode %}, you must install and sign into the {% data variables.product.prodname_github_codespaces %} extension with your {% data variables.product.product_name %} credentials. The {% data variables.product.prodname_github_codespaces %} extension requires {% data variables.product.prodname_vscode %} October 2020 Release 1.51 or later.
|
||||
|
||||
Use the {% data variables.product.prodname_vs %} Marketplace to install the [{% data variables.product.prodname_github_codespaces %}](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension. For more information, see [Extension Marketplace](https://code.visualstudio.com/docs/editor/extension-gallery) in the {% data variables.product.prodname_vscode %} documentation.
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ A codespace is a development environment that's hosted in the cloud. You can cus
|
||||
|
||||
## Using Codespaces
|
||||
|
||||
You can create a codespace from any branch or commit in your repository and begin developing using cloud-based compute resources.
|
||||
You can create a codespace from any branch or commit in your repository and begin developing using cloud-based compute resources. {% data reusables.codespaces.links-to-get-started %}
|
||||
|
||||
To customize the runtimes and tools in your codespace, you can create a custom configuration to define an environment (or _dev container_) that is specific for your repository. Using a dev container allows you to specify a Docker environment for development with a well-defined tool and runtime stack that can reference an image, Dockerfile, or docker-compose. This means that anyone using the repository will have the same tools available to them when they create a codespace.
|
||||
|
||||
@@ -38,6 +38,6 @@ You can also personalize aspects of your codespace environment by using a public
|
||||
|
||||
## About billing for {% data variables.product.prodname_codespaces %}
|
||||
|
||||
For information on billing for {% data variables.product.prodname_codespaces %}, see "[Managing billing for {% data variables.product.prodname_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces)."
|
||||
For information on pricing, storage, and usage for {% data variables.product.prodname_codespaces %}, see "[Managing billing for {% data variables.product.prodname_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces)."
|
||||
|
||||
{% data reusables.codespaces.codespaces-spending-limit-requirement %} For information on how organizations owners and billing managers can manage the spending limit for {% data variables.product.prodname_codespaces %} for an organization, see "[Managing your spending limit for {% data variables.product.prodname_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)."
|
||||
|
||||
@@ -135,7 +135,7 @@ The newly added `devcontainer.json` file defines a few properties that are descr
|
||||
- **Terminal.integrated.shell.linux** - While bash is the default here, you could use other terminal shells by modifying this.
|
||||
- **Extensions** - These are extensions included by default.
|
||||
- **ms-dotnettools.csharp** - The Microsoft C# extension provides rich support for developing in C#, including features such as IntelliSense, linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more.
|
||||
- **forwardPorts** - Any ports listed here will be forwarded automatically.
|
||||
- **forwardPorts** - Any ports listed here will be forwarded automatically. For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
|
||||
- **postCreateCommand** - If you want to run anything after you land in your codespace that’s not defined in the Dockerfile, like `dotnet restore`, you can do that here.
|
||||
- **remoteUser** - By default, you’re running as the vscode user, but you can optionally set this to root.
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ The newly added `devcontainer.json` file defines a few properties that are descr
|
||||
- **Terminal.integrated.shell.linux** - While bash is the default here, you could use other terminal shells by modifying this.
|
||||
- **Extensions** - These are extensions included by default.
|
||||
- **Vscjava.vscode-java-pack** - The Java Extension Pack provides popular extensions for Java development to get you started.
|
||||
- **forwardPorts** - Any ports listed here will be forwarded automatically.
|
||||
- **forwardPorts** - Any ports listed here will be forwarded automatically. For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
|
||||
- **postCreateCommand** - If you want to run anything after you land in your codespace that’s not defined in the Dockerfile, you can do that here.
|
||||
- **remoteUser** - By default, you’re running as the `vscode` user, but you can optionally set this to `root`.
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ The newly added `devcontainer.json` file defines a few properties that are descr
|
||||
- **Terminal.integrated.shell.linux** - While bash is the default here, you could use other terminal shells by modifying this.
|
||||
- **Extensions** - These are extensions included by default.
|
||||
- **Dbaeumer.vscode-eslint** - ES lint is a great extension for linting, but for JavaScript there are a number of great Marketplace extensions you could also include.
|
||||
- **forwardPorts** - Any ports listed here will be forwarded automatically.
|
||||
- **forwardPorts** - Any ports listed here will be forwarded automatically. For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
|
||||
- **postCreateCommand** - If you want to run anything after you land in your codespace that’s not defined in the Dockerfile, you can do that here.
|
||||
- **remoteUser** - By default, you’re running as the vscode user, but you can optionally set this to root.
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ The newly added `devcontainer.json` file defines a few properties that are descr
|
||||
- **Terminal.integrated.shell.linux** - While bash is the default here, you could use other terminal shells by modifying this.
|
||||
- **Extensions** - These are extensions included by default.
|
||||
- **ms-python.python** - The Microsoft Python extension provides rich support for the Python language (for all actively supported versions of the language: >=3.6), including features such as IntelliSense, linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more.
|
||||
- **forwardPorts** - Any ports listed here will be forwarded automatically.
|
||||
- **forwardPorts** - Any ports listed here will be forwarded automatically. For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
|
||||
- **postCreateCommand** - If you want to run anything after you land in your codespace that’s not defined in the Dockerfile, like `pip3 install -r requirements`, you can do that here.
|
||||
- **remoteUser** - By default, you’re running as the `vscode` user, but you can optionally set this to `root`.
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ shortTitle: Configure
|
||||

|
||||
9. Enter a commit message describing your changes.
|
||||

|
||||
10. Below the commit message fields, decide whether to commit your template directly to the default branch, or to create a new branch and open a pull request. For more information about pull requests, see "[About pull requests](/articles/about-pull-requests)."
|
||||
10. Below the commit message fields, decide whether to commit your template directly to the default branch, or to create a new branch and open a pull request. For more information about pull requests, see "[About pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)."
|
||||

|
||||
11. Click **Commit changes**. Once these changes are merged into the default branch, the template will be available for contributors to use when they open new issues in the repository.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Repositories on {% data variables.product.prodname_dotcom %} are remote reposito
|
||||
|
||||
You can create a local copy of any repository on {% data variables.product.product_name %} that you have access to by cloning the repository. If you own a repository or have write permissions, you can sync between the local and remote locations. For more information, see "[Syncing your branch](/desktop/contributing-and-collaborating-using-github-desktop/syncing-your-branch)."
|
||||
|
||||
When you clone a repository, any changes you push to {% data variables.product.product_name %} will affect the original repository. To make changes without affecting the original project, you can create a separate copy by forking the repository. You can create a pull request to propose that maintainers incorporate the changes in your fork into the original upstream repository. For more information, see "[About forks](/github/collaborating-with-issues-and-pull-requests/about-forks)."
|
||||
When you clone a repository, any changes you push to {% data variables.product.product_name %} will affect the original repository. To make changes without affecting the original project, you can create a separate copy by forking the repository. You can create a pull request to propose that maintainers incorporate the changes in your fork into the original upstream repository. For more information, see "[About forks](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)."
|
||||
|
||||
When you try to use {% data variables.product.prodname_desktop %} to clone a repository that you do not have write access to, {% data variables.product.prodname_desktop %} will prompt you to create a fork automatically. You can choose to use your fork to contribute to the original upstream repository or to work independently on your own project. Any existing forks default to contributing changes to their upstream repositories. You can modify this choice at any time. For more information, see "[Managing fork behavior](#managing-fork-behavior)".
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ You always create a branch from an existing branch. Typically, you might create
|
||||
|
||||
You can also create a branch starting from a previous commit in a branch's history. This can be helpful if you need to return to an earlier view of the repository to investigate a bug, or to create a hot fix on top of your latest release.
|
||||
|
||||
Once you're satisfied with your work, you can create a pull request to merge your changes in the current branch into another branch. For more information, see "[Creating an issue or pull request](/desktop/contributing-to-projects/creating-an-issue-or-pull-request)" and "[About pull requests](/articles/about-pull-requests)."
|
||||
Once you're satisfied with your work, you can create a pull request to merge your changes in the current branch into another branch. For more information, see "[Creating an issue or pull request](/desktop/contributing-to-projects/creating-an-issue-or-pull-request)" and "[About pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)."
|
||||
|
||||
You can always create a branch in {% data variables.product.prodname_desktop %} if you have read access to a repository, but you can only push the branch to {% data variables.product.prodname_dotcom %} if you have write access to the repository.
|
||||
|
||||
@@ -118,6 +118,6 @@ You can't delete a branch if it's currently associated with an open pull request
|
||||
|
||||
- "[Cloning a repository from {% data variables.product.prodname_desktop %}](/desktop/guides/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop)"
|
||||
- "[Branch](/articles/github-glossary/#branch)" in the {% data variables.product.prodname_dotcom %} glossary
|
||||
- "[About branches](/articles/about-branches)"
|
||||
- "[About branches](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches)"
|
||||
- "[Branches in a Nutshell](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell)" in the Git documentation
|
||||
- "[Stashing changes](/desktop/contributing-and-collaborating-using-github-desktop/stashing-changes)"
|
||||
|
||||
@@ -27,7 +27,7 @@ You can use {% data variables.product.prodname_discussions %} to discuss big pic
|
||||
- You want to collect feedback from a wider community about a project
|
||||
- You want to keep bug fixes, feature requests, and general conversations separate
|
||||
|
||||
Issues are useful for discussing specific details of a project such as bug reports and planned improvements. For more information, see "[About issues](/articles/about-issues)." Pull requests allow you to comment directly on proposed changes. For more information, see "[About pull requests](/articles/about-pull-requests)" and "[Commenting on a pull request](/articles/commenting-on-a-pull-request)."
|
||||
Issues are useful for discussing specific details of a project such as bug reports and planned improvements. For more information, see "[About issues](/articles/about-issues)." Pull requests allow you to comment directly on proposed changes. For more information, see "[About pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)" and "[Commenting on a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)."
|
||||
|
||||
{% data reusables.organizations.team-discussions-purpose %} For more information, see "[About team discussions](/organizations/collaborating-with-your-team/about-team-discussions)."
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ You can see the teams that are working on or have submitted an assignment in the
|
||||
|
||||
- When a team finishes an assignment, you can review the files in the repository, or you can review the history and visualizations for the repository to better understand how the team collaborated. For more information, see "[Visualizing repository data with graphs](/github/visualizing-repository-data-with-graphs)."
|
||||
|
||||
- You can provide feedback for an assignment by commenting on individual commits or lines in a pull request. For more information, see "[Commenting on a pull request](/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request)" and "[Opening an issue from code](/github/managing-your-work-on-github/opening-an-issue-from-code)." For more information about creating saved replies to provide feedback for common errors, see "[About saved replies](/github/writing-on-github/about-saved-replies)."
|
||||
- You can provide feedback for an assignment by commenting on individual commits or lines in a pull request. For more information, see "[Commenting on a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)" and "[Opening an issue from code](/github/managing-your-work-on-github/opening-an-issue-from-code)." For more information about creating saved replies to provide feedback for common errors, see "[About saved replies](/github/writing-on-github/about-saved-replies)."
|
||||
|
||||
## Further reading
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ You can see whether a student has joined the classroom and accepted or submitted
|
||||
|
||||
- When a student finishes an assignment, you can review the files in the repository, or you can review the history and visualizations for the repository to better understand the student's work. For more information, see "[Visualizing repository data with graphs](/github/visualizing-repository-data-with-graphs)."
|
||||
|
||||
- You can provide feedback for an assignment by commenting on individual commits or lines in a pull request. For more information, see "[Commenting on a pull request](/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request)" and "[Opening an issue from code](/github/managing-your-work-on-github/opening-an-issue-from-code)." For more information about creating saved replies to provide feedback for common errors, see "[About saved replies](/github/writing-on-github/about-saved-replies)."
|
||||
- You can provide feedback for an assignment by commenting on individual commits or lines in a pull request. For more information, see "[Commenting on a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)" and "[Opening an issue from code](/github/managing-your-work-on-github/opening-an-issue-from-code)." For more information about creating saved replies to provide feedback for common errors, see "[About saved replies](/github/writing-on-github/about-saved-replies)."
|
||||
|
||||
## Further reading
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ To create and access the feedback pull request, you must enable the feedback pul
|
||||
{% data reusables.classroom.click-assignment-in-list %}
|
||||
1. To the right of the submission, click **Review**.
|
||||

|
||||
1. Review the pull request. For more information, see "[Commenting on a pull request](/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request)."
|
||||
1. Review the pull request. For more information, see "[Commenting on a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)."
|
||||
|
||||
## Further reading
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ Click **Watch** at the top of a repository to watch it.
|
||||
|
||||
### Creating pull requests
|
||||
|
||||
You may want to contribute to another person's project, whether to add features or to fix bugs. After making changes, let the original author know by sending a pull request. For more information, see "[About pull requests](/articles/about-pull-requests)."
|
||||
You may want to contribute to another person's project, whether to add features or to fix bugs. After making changes, let the original author know by sending a pull request. For more information, see "[About pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)."
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ When you fork a project in order to propose changes to the original repository,
|
||||
> upstream https://{% data variables.command_line.codeblock %}/<em>ORIGINAL_OWNER</em>/<em>ORIGINAL_REPOSITORY</em>.git (push)
|
||||
```
|
||||
|
||||
Now, you can keep your fork synced with the upstream repository with a few Git commands. For more information, see "[Syncing a fork](/articles/syncing-a-fork)."
|
||||
Now, you can keep your fork synced with the upstream repository with a few Git commands. For more information, see "[Syncing a fork](/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)."
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
@@ -196,7 +196,7 @@ gh repo fork <em>repository</em> --remote-name "main-remote-repo"
|
||||
You can make any changes to a fork, including:
|
||||
|
||||
- **Creating branches:** [*Branches*](/articles/creating-and-deleting-branches-within-your-repository/) allow you to build new features or test out ideas without putting your main project at risk.
|
||||
- **Opening pull requests:** If you are hoping to contribute back to the original repository, you can send a request to the original author to pull your fork into their repository by submitting a [pull request](/articles/about-pull-requests).
|
||||
- **Opening pull requests:** If you are hoping to contribute back to the original repository, you can send a request to the original author to pull your fork into their repository by submitting a [pull request](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
|
||||
|
||||
## Find another repository to fork
|
||||
Fork a repository to start contributing to a project. {% data reusables.repositories.you-can-fork %}
|
||||
|
||||
@@ -34,7 +34,7 @@ Become better acquainted with {% data variables.product.product_name %} through
|
||||
|
||||
### Branches, forks, and pull requests
|
||||
|
||||
Learn about [Git branching](http://learngitbranching.js.org/) using an interactive tool. Read about [forks](/articles/about-forks) and [pull requests](/articles/using-pull-requests) as well as [how we use pull requests](https://github.com/blog/1124-how-we-use-pull-requests-to-build-github) at {% data variables.product.prodname_dotcom %}. Access references about using {% data variables.product.prodname_dotcom %} from the [command line](https://cli.github.com/).
|
||||
Learn about [Git branching](http://learngitbranching.js.org/) using an interactive tool. Read about [forks](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) and [pull requests](/articles/using-pull-requests) as well as [how we use pull requests](https://github.com/blog/1124-how-we-use-pull-requests-to-build-github) at {% data variables.product.prodname_dotcom %}. Access references about using {% data variables.product.prodname_dotcom %} from the [command line](https://cli.github.com/).
|
||||
|
||||
### Tune in
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ You can continue to commit and push changes in response to the reviews. Your pul
|
||||
|
||||
### Merge your pull request
|
||||
|
||||
Once your pull request is approved, merge your pull request. This will automatically merge your branch so that your changes appear on the default branch. {% data variables.product.prodname_dotcom %} retains the history of comments and commits in the pull request to help future contributors understand your changes. For more information, see "[Merging a pull request](/articles/merging-a-pull-request)."
|
||||
Once your pull request is approved, merge your pull request. This will automatically merge your branch so that your changes appear on the default branch. {% data variables.product.prodname_dotcom %} retains the history of comments and commits in the pull request to help future contributors understand your changes. For more information, see "[Merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)."
|
||||
|
||||
{% data variables.product.prodname_dotcom %} will tell you if your pull request has conflicts that must be resolved before merging. For more information, see "[Addressing merge conflicts](/github/collaborating-with-issues-and-pull-requests/addressing-merge-conflicts)."
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Typically, you would use `git rebase` to:
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: Because changing your commit history can make things difficult for everyone else using the repository, it's considered bad practice to rebase commits when you've already pushed to a repository. To learn how to safely rebase on {% data variables.product.product_location %}, see "[About pull request merges](/articles/about-pull-request-merges)."
|
||||
**Warning**: Because changing your commit history can make things difficult for everyone else using the repository, it's considered bad practice to rebase commits when you've already pushed to a repository. To learn how to safely rebase on {% data variables.product.product_location %}, see "[About pull request merges](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)."
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ $ git pull <em>remotename</em> <em>branchname</em>
|
||||
|
||||
Because `pull` performs a merge on the retrieved changes, you should ensure that
|
||||
your local work is committed before running the `pull` command. If you run into
|
||||
[a merge conflict](/articles/resolving-a-merge-conflict-using-the-command-line)
|
||||
[a merge conflict](/github/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line
|
||||
you cannot resolve, or if you decide to quit the merge, you can use `git merge --abort`
|
||||
to take the branch back to where it was in before you pulled.
|
||||
|
||||
|
||||
@@ -106,9 +106,9 @@ git fetch upstream
|
||||
```
|
||||
|
||||
When you're done making local changes, you can push your local branch to GitHub
|
||||
and [initiate a pull request](/articles/about-pull-requests).
|
||||
and [initiate a pull request](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
|
||||
|
||||
For more information on working with forks, see "[Syncing a fork](/articles/syncing-a-fork)".
|
||||
For more information on working with forks, see "[Syncing a fork](/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)".
|
||||
|
||||
## Further reading
|
||||
|
||||
|
||||
@@ -30,4 +30,4 @@ Here, Git is telling you which commit is causing the conflict (`fa39187`). You'r
|
||||
* You can run `git rebase --skip` to completely skip the commit. That means that none of the changes introduced by the problematic commit will be included. It is very rare that you would choose this option.
|
||||
* You can fix the conflict.
|
||||
|
||||
To fix the conflict, you can follow [the standard procedures for resolving merge conflicts from the command line](/articles/resolving-a-merge-conflict-using-the-command-line). When you're finished, you'll need to call `git rebase --continue` in order for Git to continue processing the rest of the rebase.
|
||||
To fix the conflict, you can follow [the standard procedures for resolving merge conflicts from the command line](/github/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line. When you're finished, you'll need to call `git rebase --continue` in order for Git to continue processing the rest of the rebase.
|
||||
|
||||
@@ -106,7 +106,14 @@ For a full list of supported commands, see "[{% data variables.product.prodname_
|
||||
|
||||
3. If the command you want is not displayed, check your scope then start entering the command name in the text box.
|
||||
|
||||
4. Use the arrow keys to highlight the command you want and use <kbd>Enter</kbd> to run it.
|
||||
4. Use the arrow keys to highlight the command you want and use <kbd>Enter</kbd> to run it.
|
||||
|
||||
## Closing the command palette
|
||||
|
||||
When the command palette is active, you can use one of the following keyboard shortcuts to close the command palette:
|
||||
|
||||
- Search and navigation mode: <kbd>esc</kbd> or <kbd>Ctrl</kbd><kbd>k</kbd> (Windows and Linux) <kbd>⌘</kbd><kbd>k</kbd> (Mac)
|
||||
- Command mode: <kbd>esc</kbd> or <kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>k</kbd> (Windows and Linux) <kbd>⌘</kbd><kbd>Shift</kbd><kbd>k</kbd> (Mac)
|
||||
|
||||
## {% data variables.product.prodname_command_palette %} reference
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ The {% data variables.product.prodname_command_palette %} also gives you quick a
|
||||
|-----------|------------
|
||||
|<kbd>g</kbd> <kbd>c</kbd> | Go to the **Code** tab
|
||||
|<kbd>g</kbd> <kbd>i</kbd> | Go to the **Issues** tab. For more information, see "[About issues](/articles/about-issues)."
|
||||
|<kbd>g</kbd> <kbd>p</kbd> | Go to the **Pull requests** tab. For more information, see "[About pull requests](/articles/about-pull-requests)."{% ifversion fpt or ghes or ghec %}
|
||||
|<kbd>g</kbd> <kbd>p</kbd> | Go to the **Pull requests** tab. For more information, see "[About pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)."{% ifversion fpt or ghes or ghec %}
|
||||
|<kbd>g</kbd> <kbd>a</kbd> | Go to the **Actions** tab. For more information, see "[About Actions](/actions/getting-started-with-github-actions/about-github-actions)."{% endif %}
|
||||
|<kbd>g</kbd> <kbd>b</kbd> | Go to the **Projects** tab. For more information, see "[About project boards](/articles/about-project-boards)."
|
||||
|<kbd>g</kbd> <kbd>w</kbd> | Go to the **Wiki** tab. For more information, see "[About wikis](/communities/documenting-your-project-with-wikis/about-wikis)."{% ifversion fpt or ghec %}
|
||||
@@ -94,7 +94,7 @@ For more keyboard shortcuts, see the [CodeMirror documentation](https://codemirr
|
||||
| <kbd>control enter</kbd> | Submits a comment
|
||||
| <kbd>control .</kbd> and then <kbd>control [saved reply number]</kbd> | Opens saved replies menu and then autofills comment field with a saved reply. For more information, see "[About saved replies](/articles/about-saved-replies)."{% ifversion fpt or ghae-next or ghes > 3.2 or ghec %}
|
||||
| <kbd>control shift .</kbd> or <kbd>command shift.</kbd> | Inserts Markdown formatting for a quote{% endif %}{% ifversion fpt or ghec %}
|
||||
|<kbd>control g</kbd> or <kbd>command g</kbd> | Insert a suggestion. For more information, see "[Reviewing proposed changes in a pull request](/articles/reviewing-proposed-changes-in-a-pull-request)." |{% endif %}
|
||||
|<kbd>control g</kbd> or <kbd>command g</kbd> | Insert a suggestion. For more information, see "[Reviewing proposed changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)." |{% endif %}
|
||||
| <kbd>r</kbd> | Quote the selected text in your reply. For more information, see "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax#quoting-text)." |
|
||||
|
||||
## Issue and pull request lists
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
title: About merge conflicts
|
||||
intro: 'Merge conflicts happen when you merge branches that have competing commits, and Git needs your help to decide which changes to incorporate in the final merge.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/addressing-merge-conflicts/about-merge-conflicts
|
||||
- /articles/about-merge-conflicts
|
||||
- /github/collaborating-with-issues-and-pull-requests/about-merge-conflicts
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
Git can often resolve differences between branches and merge them automatically. Usually, the changes are on different lines, or even in different files, which makes the merge simple for computers to understand. However, sometimes there are competing changes that Git can't resolve without your help. Often, merge conflicts happen when people make different changes to the same line of the same file, or when one person edits a file and another person deletes the same file.
|
||||
|
||||
You must resolve all merge conflicts before you can merge a pull request on {% data variables.product.product_name %}. If you have a merge conflict between the compare branch and base branch in your pull request, you can view a list of the files with conflicting changes above the **Merge pull request** button. The **Merge pull request** button is deactivated until you've resolved all conflicts between the compare branch and base branch.
|
||||
|
||||

|
||||
|
||||
## Resolving merge conflicts
|
||||
|
||||
To resolve a merge conflict, you must manually edit the conflicted file to select the changes that you want to keep in the final merge. There are a couple of different ways to resolve a merge conflict:
|
||||
|
||||
- If your merge conflict is caused by competing line changes, such as when people make different changes to the same line of the same file on different branches in your Git repository, you can resolve it on {% data variables.product.product_name %} using the conflict editor. For more information, see "[Resolving a merge conflict on {% data variables.product.prodname_dotcom %}](/articles/resolving-a-merge-conflict-on-github)."
|
||||
- For all other types of merge conflicts, you must resolve the merge conflict in a local clone of the repository and push the change to your branch on {% data variables.product.product_name %}. You can use the command line or a tool like [{% data variables.product.prodname_desktop %}](https://desktop.github.com/) to push the change. For more information, see "[Resolving a merge conflict on the command line](/articles/resolving-a-merge-conflict-using-the-command-line)."
|
||||
|
||||
If you have a merge conflict on the command line, you cannot push your local changes to {% data variables.product.product_name %} until you resolve the merge conflict locally on your computer. If you try merging branches on the command line that have a merge conflict, you'll get an error message. For more information, see "[Resolving a merge conflict using the command line](/articles/resolving-a-merge-conflict-using-the-command-line/)."
|
||||
```shell
|
||||
$ git merge <em>BRANCH-NAME</em>
|
||||
> Auto-merging styleguide.md
|
||||
> CONFLICT (content): Merge conflict in styleguide.md
|
||||
> Automatic merge failed; fix conflicts and then commit the result
|
||||
```
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About pull request merges](/articles/about-pull-request-merges/)"
|
||||
- "[About pull requests](/articles/about-pull-requests/)"
|
||||
- "[Resolving a merge conflict using the command line](/articles/resolving-a-merge-conflict-using-the-command-line)"
|
||||
- "[Resolving a merge conflict on GitHub](/articles/resolving-a-merge-conflict-on-github)"
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: Addressing merge conflicts
|
||||
intro: 'If your changes have merge conflicts with the base branch, you must address the merge conflicts before you can merge your pull request''s changes.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/addressing-merge-conflicts/
|
||||
- /articles/addressing-merge-conflicts
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
children:
|
||||
- /about-merge-conflicts
|
||||
- /resolving-a-merge-conflict-on-github
|
||||
- /resolving-a-merge-conflict-using-the-command-line
|
||||
shortTitle: Address merge conflicts
|
||||
---
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
title: Resolving a merge conflict on GitHub
|
||||
intro: 'You can resolve simple merge conflicts that involve competing line changes on GitHub, using the conflict editor.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github
|
||||
- /articles/resolving-a-merge-conflict-on-github
|
||||
- /github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Resolve merge conflicts
|
||||
---
|
||||
You can only resolve merge conflicts on {% data variables.product.product_name %} that are caused by competing line changes, such as when people make different changes to the same line of the same file on different branches in your Git repository. For all other types of merge conflicts, you must resolve the conflict locally on the command line. For more information, see "[Resolving a merge conflict using the command line](/articles/resolving-a-merge-conflict-using-the-command-line/)."
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
If a site administrator disables the merge conflict editor for pull requests between repositories, you cannot use the conflict editor on {% data variables.product.product_name %} and must resolve merge conflicts on the command line. For example, if the merge conflict editor is disabled, you cannot use it on a pull request between a fork and upstream repository.
|
||||
{% endif %}
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning:** When you resolve a merge conflict on {% data variables.product.product_name %}, the entire [base branch](/github/getting-started-with-github/github-glossary#base-branch) of your pull request is merged into the [head branch](/github/getting-started-with-github/github-glossary#head-branch). Make sure you really want to commit to this branch. If the head branch is the default branch of your repository, you'll be given the option of creating a new branch to serve as the head branch for your pull request. If the head branch is protected you won't be able to merge your conflict resolution into it, so you'll be prompted to create a new head branch. For more information, see "[About protected branches](/github/administering-a-repository/about-protected-branches)."
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
1. In the "Pull Requests" list, click the pull request with a merge conflict that you'd like to resolve.
|
||||
1. Near the bottom of your pull request, click **Resolve conflicts**.
|
||||

|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** If the **Resolve conflicts** button is deactivated, your pull request's merge conflict is too complex to resolve on {% data variables.product.product_name %}{% ifversion ghes or ghae %} or the site administrator has disabled the conflict editor for pull requests between repositories{% endif %}. You must resolve the merge conflict using an alternative Git client, or by using Git on the command line. For more information see "[Resolving a merge conflict using the command line](/articles/resolving-a-merge-conflict-using-the-command-line)."
|
||||
|
||||
{% endtip %}
|
||||
{% data reusables.pull_requests.decide-how-to-resolve-competing-line-change-merge-conflict %}
|
||||

|
||||
1. If you have more than one merge conflict in your file, scroll down to the next set of conflict markers and repeat steps four and five to resolve your merge conflict.
|
||||
1. Once you've resolved all the conflicts in the file, click **Mark as resolved**.
|
||||

|
||||
1. If you have more than one file with a conflict, select the next file you want to edit on the left side of the page under "conflicting files" and repeat steps four through seven until you've resolved all of your pull request's merge conflicts.
|
||||

|
||||
1. Once you've resolved all your merge conflicts, click **Commit merge**. This merges the entire base branch into your head branch.
|
||||

|
||||
1. If prompted, review the branch that you are committing to.
|
||||
|
||||
If the head branch is the default branch of the repository, you can choose either to update this branch with the changes you made to resolve the conflict, or to create a new branch and use this as the head branch of the pull request.
|
||||

|
||||
|
||||
If you choose to create a new branch, enter a name for the branch.
|
||||
|
||||
If the head branch of your pull request is protected you must create a new branch. You won't get the option to update the protected branch.
|
||||
|
||||
Click **Create branch and update my pull request** or **I understand, continue updating _BRANCH_**. The button text corresponds to the action you are performing.
|
||||
1. To merge your pull request, click **Merge pull request**. For more information about other pull request merge options, see "[Merging a pull request](/articles/merging-a-pull-request/)."
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About pull request merges](/articles/about-pull-request-merges)"
|
||||
@@ -1,130 +0,0 @@
|
||||
---
|
||||
title: Resolving a merge conflict using the command line
|
||||
intro: You can resolve merge conflicts using the command line and a text editor.
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line
|
||||
- /articles/resolving-a-merge-conflict-from-the-command-line/
|
||||
- /articles/resolving-a-merge-conflict-using-the-command-line
|
||||
- /github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-using-the-command-line
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Resolve merge conflicts in Git
|
||||
---
|
||||
Merge conflicts occur when competing changes are made to the same line of a file, or when one person edits a file and another person deletes the same file. For more information, see "[About merge conflicts](/articles/about-merge-conflicts/)."
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** You can use the conflict editor on {% data variables.product.product_name %} to resolve competing line change merge conflicts between branches that are part of a pull request. For more information, see "[Resolving a merge conflict on GitHub](/articles/resolving-a-merge-conflict-on-github)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
## Competing line change merge conflicts
|
||||
|
||||
To resolve a merge conflict caused by competing line changes, you must choose which changes to incorporate from the different branches in a new commit.
|
||||
|
||||
For example, if you and another person both edited the file _styleguide.md_ on the same lines in different branches of the same Git repository, you'll get a merge conflict error when you try to merge these branches. You must resolve this merge conflict with a new commit before you can merge these branches.
|
||||
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
2. Navigate into the local Git repository that has the merge conflict.
|
||||
```shell
|
||||
cd <em>REPOSITORY-NAME</em>
|
||||
```
|
||||
3. Generate a list of the files affected by the merge conflict. In this example, the file *styleguide.md* has a merge conflict.
|
||||
```shell
|
||||
$ git status
|
||||
> # On branch branch-b
|
||||
> # You have unmerged paths.
|
||||
> # (fix conflicts and run "git commit")
|
||||
> #
|
||||
> # Unmerged paths:
|
||||
> # (use "git add <file>..." to mark resolution)
|
||||
> #
|
||||
> # both modified: styleguide.md
|
||||
> #
|
||||
> no changes added to commit (use "git add" and/or "git commit -a")
|
||||
```
|
||||
4. Open your favorite text editor, such as [Atom](https://atom.io/), and navigate to the file that has merge conflicts.
|
||||
5. To see the beginning of the merge conflict in your file, search the file for the conflict marker `<<<<<<<`. When you open the file in your text editor, you'll see the changes from the HEAD or base branch after the line `<<<<<<< HEAD`. Next, you'll see `=======`, which divides your changes from the changes in the other branch, followed by `>>>>>>> BRANCH-NAME`. In this example, one person wrote "open an issue" in the base or HEAD branch and another person wrote "ask your question in IRC" in the compare branch or `branch-a`.
|
||||
|
||||
```
|
||||
If you have questions, please
|
||||
<<<<<<< HEAD
|
||||
open an issue
|
||||
=======
|
||||
ask your question in IRC.
|
||||
>>>>>>> branch-a
|
||||
```
|
||||
{% data reusables.pull_requests.decide-how-to-resolve-competing-line-change-merge-conflict %} In this example, both changes are incorporated into the final merge:
|
||||
|
||||
```shell
|
||||
If you have questions, please open an issue or ask in our IRC channel if it's more urgent.
|
||||
```
|
||||
7. Add or stage your changes.
|
||||
```shell
|
||||
$ git add .
|
||||
```
|
||||
8. Commit your changes with a comment.
|
||||
```shell
|
||||
$ git commit -m "Resolved merge conflict by incorporating both suggestions."
|
||||
```
|
||||
|
||||
You can now merge the branches on the command line or [push your changes to your remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) on {% data variables.product.product_name %} and [merge your changes](/articles/merging-a-pull-request/) in a pull request.
|
||||
|
||||
## Removed file merge conflicts
|
||||
|
||||
To resolve a merge conflict caused by competing changes to a file, where a person deletes a file in one branch and another person edits the same file, you must choose whether to delete or keep the removed file in a new commit.
|
||||
|
||||
For example, if you edited a file, such as *README.md*, and another person removed the same file in another branch in the same Git repository, you'll get a merge conflict error when you try to merge these branches. You must resolve this merge conflict with a new commit before you can merge these branches.
|
||||
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
2. Navigate into the local Git repository that has the merge conflict.
|
||||
```shell
|
||||
cd <em>REPOSITORY-NAME</em>
|
||||
```
|
||||
2. Generate a list of the files affected by the merge conflict. In this example, the file *README.md* has a merge conflict.
|
||||
```shell
|
||||
$ git status
|
||||
> # On branch main
|
||||
> # Your branch and 'origin/main' have diverged,
|
||||
> # and have 1 and 2 different commits each, respectively.
|
||||
> # (use "git pull" to merge the remote branch into yours)
|
||||
> # You have unmerged paths.
|
||||
> # (fix conflicts and run "git commit")
|
||||
> #
|
||||
> # Unmerged paths:
|
||||
> # (use "git add/rm <file>..." as appropriate to mark resolution)
|
||||
> #
|
||||
> # deleted by us: README.md
|
||||
> #
|
||||
> # no changes added to commit (use "git add" and/or "git commit -a")
|
||||
```
|
||||
3. Open your favorite text editor, such as [Atom](https://atom.io/), and navigate to the file that has merge conflicts.
|
||||
6. Decide if you want keep the removed file. You may want to view the latest changes made to the removed file in your text editor.
|
||||
|
||||
To add the removed file back to your repository:
|
||||
```shell
|
||||
$ git add README.md
|
||||
```
|
||||
To remove this file from your repository:
|
||||
```shell
|
||||
$ git rm README.md
|
||||
> README.md: needs merge
|
||||
> rm 'README.md'
|
||||
```
|
||||
7. Commit your changes with a comment.
|
||||
```shell
|
||||
$ git commit -m "Resolved merge conflict by keeping README.md file."
|
||||
> [branch-d 6f89e49] Merge branch 'branch-c' into branch-d
|
||||
```
|
||||
|
||||
You can now merge the branches on the command line or [push your changes to your remote repository](/github/getting-started-with-github/pushing-commits-to-a-remote-repository/) on {% data variables.product.product_name %} and [merge your changes](/articles/merging-a-pull-request/) in a pull request.
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About merge conflicts](/articles/about-merge-conflicts)"
|
||||
- "[Checking out pull requests locally](/articles/checking-out-pull-requests-locally/)"
|
||||
@@ -1,77 +0,0 @@
|
||||
---
|
||||
title: About status checks
|
||||
intro: Status checks let you know if your commits meet the conditions set for the repository you're contributing to.
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks
|
||||
- /articles/about-statuses/
|
||||
- /articles/about-status-checks
|
||||
- /github/collaborating-with-issues-and-pull-requests/about-status-checks
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
Status checks are based on external processes, such as continuous integration builds, which run for each push you make to a repository. You can see the *pending*, *passing*, or *failing* state of status checks next to individual commits in your pull request.
|
||||
|
||||

|
||||
|
||||
Anyone with write permissions to a repository can set the state for any status check in the repository.
|
||||
|
||||
You can see the overall state of the last commit to a branch on your repository's branches page or in your repository's list of pull requests.
|
||||
|
||||
{% data reusables.pull_requests.required-checks-must-pass-to-merge %}
|
||||
|
||||
## Types of status checks on {% data variables.product.product_name %}
|
||||
|
||||
There are two types of status checks on {% data variables.product.product_name %}:
|
||||
|
||||
- Checks
|
||||
- Statuses
|
||||
|
||||
_Checks_ are different from _statuses_ in that they provide line annotations, more detailed messaging, and are only available for use with {% data variables.product.prodname_github_apps %}.
|
||||
|
||||
Organization owners and users with push access to a repository can create checks and statuses with {% data variables.product.product_name %}'s API. For more information, see "[Checks](/rest/reference/checks)" and "[Statuses](/rest/reference/repos#statuses)."
|
||||
|
||||
## Checks
|
||||
|
||||
When _checks_ are set up in a repository, pull requests have a **Checks** tab where you can view detailed build output from status checks and rerun failed checks.
|
||||
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** The **Checks** tab only gets populated for pull requests if you set up _checks_, not _statuses_, for the repository.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
When a specific line in a commit causes a check to fail, you will see details about the failure, warning, or notice next to the relevant code in the **Files** tab of the pull request.
|
||||
|
||||

|
||||
|
||||
You can navigate between the checks summaries for various commits in a pull request, using the commit drop-down menu under the **Conversation** tab.
|
||||
|
||||

|
||||
|
||||
### Skipping and requesting checks for individual commits
|
||||
|
||||
When a repository is set to automatically request checks for pushes, you can choose to skip checks for an individual commit you push. When a repository is _not_ set to automatically request checks for pushes, you can request checks for an individual commit you push. For more information on these settings, see "[Check Suites](/rest/reference/checks#update-repository-preferences-for-check-suites)."
|
||||
|
||||
To skip or request checks for your commit, add one of the following trailer lines to the end of your commit message:
|
||||
|
||||
- To _skip checks_ for a commit, type your commit message and a short, meaningful description of your changes. After your commit description, before the closing quotation, add two empty lines followed by `skip-checks: true`:
|
||||
```shell
|
||||
$ git commit -m "Update README
|
||||
>
|
||||
>
|
||||
skip-checks: true"
|
||||
```
|
||||
- To _request_ checks for a commit, type your commit message and a short, meaningful description of your changes. After your commit description, before the closing quotation, add two empty lines followed by `request-checks: true`:
|
||||
```shell
|
||||
$ git commit -m "Refactor usability tests
|
||||
>
|
||||
>
|
||||
request-checks: true"
|
||||
```
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: Collaborating on repositories with code quality features
|
||||
intro: 'Workflow quality features like statuses, {% ifversion ghes %}pre-receive hooks, {% endif %}protected branches, and required status checks help collaborators make contributions that meet conditions set by organization and repository administrators.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/collaborating-on-repositories-with-code-quality-features/
|
||||
- /articles/collaborating-on-repositories-with-code-quality-features-enabled/
|
||||
- /articles/collaborating-on-repositories-with-code-quality-features
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
children:
|
||||
- /about-status-checks
|
||||
- /working-with-pre-receive-hooks
|
||||
shortTitle: Code quality features
|
||||
---
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
title: Working with pre-receive hooks
|
||||
intro: '*Pre-receive hooks* enforce rules for contributions before commits may be pushed to a repository.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/collaborating-on-repositories-with-code-quality-features/working-with-pre-receive-hooks
|
||||
- /articles/working-with-pre-receive-hooks
|
||||
- /github/collaborating-with-issues-and-pull-requests/working-with-pre-receive-hooks
|
||||
versions:
|
||||
ghes: '*'
|
||||
shortTitle: Pre-receive hooks
|
||||
---
|
||||
Pre-receive hooks run tests on code pushed to a repository to ensure contributions meet repository or organization policy. If the commit contents pass the tests, the push will be accepted into the repository. If the commit contents do not pass the tests, the push will not be accepted.
|
||||
|
||||
If your push isn't accepted, you'll see an error message corresponding to the failed pre-receive hook.
|
||||
|
||||
```shell
|
||||
$ git push
|
||||
Counting objects: 3, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (2/2), done.
|
||||
Writing objects: 100% (3/3), 916 bytes | 0 bytes/s, done.
|
||||
Total 3 (delta 0), reused 0 (delta 0)
|
||||
remote: always_reject.sh: failed with exit status 1
|
||||
remote: error: rejecting all pushes
|
||||
To https://54.204.174.51/hodor/nope.git
|
||||
! [remote rejected] main -> main (pre-receive hook declined)
|
||||
error: failed to push some refs to 'https://54.204.174.51/hodor/nope.git'
|
||||
```
|
||||
|
||||

|
||||
|
||||
Your {% data variables.product.product_name %} site administrator can create and remove pre-receive hooks for your organization or repository, and may allow organization or repository administrators to enable or disable pre-receive hooks. For more information, see "[Using pre-receive hooks to enforce policy](/enterprise/{{ currentVersion }}/admin/guides/developer-workflow/using-pre-receive-hooks-to-enforce-policy)."
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
title: About collaborative development models
|
||||
intro: The way you use pull requests depends on the type of development model you use in your project. You can use the fork and pull model or the shared repository model.
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/getting-started/about-collaborative-development-models
|
||||
- /articles/types-of-collaborative-development-models/
|
||||
- /articles/about-collaborative-development-models
|
||||
- /github/collaborating-with-issues-and-pull-requests/about-collaborative-development-models
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Collaborative development
|
||||
---
|
||||
## Fork and pull model
|
||||
|
||||
In the fork and pull model, anyone can fork an existing repository and push changes to their personal fork. You do not need permission to the source repository to push to a user-owned fork. The changes can be pulled into the source repository by the project maintainer. When you open a pull request proposing changes from your user-owned fork to a branch in the source (upstream) repository, you can allow anyone with push access to the upstream repository to make changes to your pull request. This model is popular with open source projects as it reduces the amount of friction for new contributors and allows people to work independently without upfront coordination.
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** {% data reusables.open-source.open-source-guide-general %} {% data reusables.open-source.open-source-learning-lab %}
|
||||
|
||||
{% endtip %}
|
||||
|
||||
## Shared repository model
|
||||
|
||||
In the shared repository model, collaborators are granted push access to a single shared repository and topic branches are created when changes need to be made. Pull requests are useful in this model as they initiate code review and general discussion about a set of changes before the changes are merged into the main development branch. This model is more prevalent with small teams and organizations collaborating on private projects.
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About pull requests](/articles/about-pull-requests)"
|
||||
- "[Creating a pull request from a fork](/articles/creating-a-pull-request-from-a-fork)"
|
||||
- "[Allowing changes to a pull request branch created from a fork](/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)"
|
||||
@@ -1,21 +0,0 @@
|
||||
---
|
||||
title: Getting started
|
||||
shortTitle: Getting started
|
||||
intro: 'Learn about the {% data variables.product.prodname_dotcom %} flow and different ways to collaborate on and discuss your projects.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/getting-started/
|
||||
- /github/collaborating-with-issues-and-pull-requests/overview
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
- Issues
|
||||
- Discussions
|
||||
- Fundamentals
|
||||
children:
|
||||
- /about-collaborative-development-models
|
||||
---
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
title: About pull request merges
|
||||
intro: 'You can [merge pull requests](/articles/merging-a-pull-request) by retaining all the commits in a feature branch, squashing all commits into a single commit, or by rebasing individual commits from the `head` branch onto the `base` branch.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges
|
||||
- /articles/about-pull-request-merge-squashing/
|
||||
- /articles/about-pull-request-merges
|
||||
- /github/collaborating-with-issues-and-pull-requests/about-pull-request-merges
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
{% data reusables.pull_requests.default_merge_option %}
|
||||
|
||||
## Squash and merge your pull request commits
|
||||
|
||||
{% data reusables.pull_requests.squash_and_merge_summary %}
|
||||
|
||||
### Merge message for a squash merge
|
||||
|
||||
When you squash and merge, {% data variables.product.prodname_dotcom %} generates a commit message which you can change if you want to. The message default depends on whether the pull request contains multiple commits or just one. We do not include merge commits when we count the total number of commits.
|
||||
|
||||
Number of commits | Summary | Description |
|
||||
----------------- | ------- | ----------- |
|
||||
One commit | The title of the commit message for the single commit, followed by the pull request number | The body text of the commit message for the single commit
|
||||
More than one commit | The pull request title, followed by the pull request number | A list of the commit messages for all of the squashed commits, in date order
|
||||
|
||||
### Squashing and merging a long-running branch
|
||||
|
||||
If you plan to continue work on the [head branch](/github/getting-started-with-github/github-glossary#head-branch) of a pull request after the pull request is merged, we recommend you don't squash and merge the pull request.
|
||||
|
||||
When you create a pull request, {% data variables.product.prodname_dotcom %} identifies the most recent commit that is on both the head branch and the [base branch](/github/getting-started-with-github/github-glossary#base-branch): the common ancestor commit. When you squash and merge the pull request, {% data variables.product.prodname_dotcom %} creates a commit on the base branch that contains all of the changes you made on the head branch since the common ancestor commit.
|
||||
|
||||
Because this commit is only on the base branch and not the head branch, the common ancestor of the two branches remains unchanged. If you continue to work on the head branch, then create a new pull request between the two branches, the pull request will include all of the commits since the common ancestor, including commits that you squashed and merged in the previous pull request. If there are no conflicts, you can safely merge these commits. However, this workflow makes merge conflicts more likely. If you continue to squash and merge pull requests for a long-running head branch, you will have to resolve the same conflicts repeatedly.
|
||||
|
||||
## Rebase and merge your pull request commits
|
||||
|
||||
{% data reusables.pull_requests.rebase_and_merge_summary %}
|
||||
|
||||
You aren't able to automatically rebase and merge on {% data variables.product.product_location %} when:
|
||||
- The pull request has merge conflicts.
|
||||
- Rebasing the commits from the base branch into the head branch runs into conflicts.
|
||||
- Rebasing the commits is considered "unsafe," such as when a rebase is possible without merge conflicts but would produce a different result than a merge would.
|
||||
|
||||
If you still want to rebase the commits but can't rebase and merge automatically on {% data variables.product.product_location %} you must:
|
||||
- Rebase the topic branch (or head branch) onto the base branch locally on the command line
|
||||
- [Resolve any merge conflicts on the command line](/articles/resolving-a-merge-conflict-using-the-command-line/).
|
||||
- Force-push the rebased commits to the pull request's topic branch (or remote head branch).
|
||||
|
||||
Anyone with write permissions in the repository, can then [merge the changes](/articles/merging-a-pull-request/) using the rebase and merge button on {% data variables.product.product_location %}.
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About pull requests](/articles/about-pull-requests/)"
|
||||
- "[Addressing merge conflicts](/articles/addressing-merge-conflicts)"
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
title: Automatically merging a pull request
|
||||
intro: You can increase development velocity by enabling auto-merge for a pull request so that the pull request will merge automatically when all merge requirements are met.
|
||||
product: '{% data reusables.gated-features.auto-merge %}'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '>=3.1'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request
|
||||
- /github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request
|
||||
shortTitle: Merge PR automatically
|
||||
---
|
||||
## About auto-merge
|
||||
|
||||
If you enable auto-merge for a pull request, the pull request will merge automatically when all required reviews are met and status checks have passed. Auto-merge prevents you from waiting around for requirements to be met, so you can move on to other tasks.
|
||||
|
||||
Before you can use auto-merge with a pull request, auto-merge must be enabled for the repository. For more information, see "[Managing auto-merge for pull requests in your repository](/github/administering-a-repository/managing-auto-merge-for-pull-requests-in-your-repository)."{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}
|
||||
|
||||
After you enable auto-merge for a pull request, if someone who does not have write permissions to the repository pushes new changes to the head branch or switches the base branch of the pull request, auto-merge will be disabled. For example, if a maintainer enables auto-merge for a pull request from a fork, auto-merge will be disabled after a contributor pushes new changes to the pull request.{% endif %}
|
||||
|
||||
You can provide feedback about auto-merge by [contacting us](https://support.github.com/contact/feedback?category=prs-and-code-review&subject=Pull%20request%20auto-merge%20feedback).
|
||||
|
||||
## Enabling auto-merge
|
||||
|
||||
{% data reusables.pull_requests.auto-merge-requires-branch-protection %}
|
||||
|
||||
People with write permissions to a repository can enable auto-merge for a pull request.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
1. In the "Pull Requests" list, click the pull request you'd like to auto-merge.
|
||||
1. Optionally, to choose a merge method, select the **Enable auto-merge** drop-down menu, then click a merge method. For more information, see "[About pull request merges](/github/collaborating-with-issues-and-pull-requests/about-pull-request-merges)."
|
||||

|
||||
1. Click **Enable auto-merge**.
|
||||

|
||||
1. If you chose the merge or squash and merge methods, type a commit message and description and choose the email address you want to author the merge commit.
|
||||

|
||||
1. Click **Confirm auto-merge**.
|
||||

|
||||
|
||||
## Disabling auto-merge
|
||||
|
||||
People with write permissions to a repository and pull request authors can disable auto-merge for a pull request.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
1. In the "Pull Requests" list, click the pull request you'd like to disable auto-merge for.
|
||||
1. In the merge box, click **Disable auto-merge**.
|
||||

|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: Closing a pull request
|
||||
intro: 'You may choose to *close* a pull request without [merging it into the upstream branch](/articles/merging-a-pull-request). This can be handy if the changes proposed in the branch are no longer needed, or if another solution has been proposed in another branch.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/incorporating-changes-from-a-pull-request/closing-a-pull-request
|
||||
- /articles/closing-a-pull-request
|
||||
- /github/collaborating-with-issues-and-pull-requests/closing-a-pull-request
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
{% tip %}
|
||||
|
||||
**Tip**: If you opened a pull request with the wrong base branch, rather than closing it out and opening a new one, you can instead change the base branch. For more information, see "[Changing the base branch of a pull request](/articles/changing-the-base-branch-of-a-pull-request)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the "Pull Requests" list, click the pull request you'd like to close.
|
||||
3. At the bottom of the pull request, below the comment box, click **Close pull request**.
|
||||

|
||||
4. Optionally, [delete the branch](/articles/deleting-unused-branches). This keeps the list of branches in your repository tidy.
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: Incorporating changes from a pull request
|
||||
intro: 'You can propose changes to your work on {% data variables.product.product_name %} through pull requests. Learn how to create, manage, and merge pull requests.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/incorporating-changes-from-a-pull-request/
|
||||
- /articles/incorporating-changes-from-a-pull-request
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
children:
|
||||
- /about-pull-request-merges
|
||||
- /merging-a-pull-request
|
||||
- /automatically-merging-a-pull-request
|
||||
- /adding-a-pull-request-to-the-merge-queue
|
||||
- /closing-a-pull-request
|
||||
- /reverting-a-pull-request
|
||||
shortTitle: Incorporate changes
|
||||
---
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
---
|
||||
title: Merging a pull request
|
||||
intro: Merge a pull request into the upstream branch when work is completed. Anyone with push access to the repository can complete the merge.
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request
|
||||
- /articles/merging-a-pull-request
|
||||
- /github/collaborating-with-issues-and-pull-requests/merging-a-pull-request
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
## About pull request merges
|
||||
|
||||
In a pull request, you propose that changes you've made on a head branch should be merged into a base branch. By default, any pull request can be merged at any time, unless the head branch is in conflict with the base branch. However, there may be restrictions on when you can merge a pull request into a specific branch. For example, you may only be able to merge a pull request into the default branch if required status checks are passing. For more information, see "[About protected branches](/github/administering-a-repository/about-protected-branches)."
|
||||
|
||||
{% data reusables.pull_requests.you-can-auto-merge %}
|
||||
|
||||
If the pull request has merge conflicts, or if you'd like to test the changes before merging, you can [check out the pull request locally](/articles/checking-out-pull-requests-locally) and merge it using the command line.
|
||||
|
||||
You can't merge a draft pull request. For more information about draft pull requests, see "[About pull requests](/articles/about-pull-requests#draft-pull-requests)."
|
||||
|
||||
The repository may be configured so that the head branch for a pull request is automatically deleted when you merge a pull request. For more information, see "[Managing the automatic deletion of branches](/github/administering-a-repository/managing-the-automatic-deletion-of-branches)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.pull_requests.retargeted-on-branch-deletion %}
|
||||
For more information, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#working-with-branches)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Pull requests are merged using [the `--no-ff` option](https://git-scm.com/docs/git-merge#_fast_forward_merge), except for [pull requests with squashed or rebased commits](/articles/about-pull-request-merges), which are merged using the fast-forward option.
|
||||
|
||||
{% data reusables.pull_requests.close-issues-using-keywords %}
|
||||
|
||||
If you decide you don't want the changes in a topic branch to be merged to the upstream branch, you can [close the pull request](/articles/closing-a-pull-request) without merging.
|
||||
|
||||
## Merging a pull request
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the "Pull Requests" list, click the pull request you'd like to merge.
|
||||
3. Depending on the merge options enabled for your repository, you can:
|
||||
- [Merge all of the commits into the base branch](/articles/about-pull-request-merges/) by clicking **Merge pull request**. If the **Merge pull request** option is not shown, then click the merge drop down menu and select **Create a merge commit**.
|
||||

|
||||
- [Squash the commits into one commit](/articles/about-pull-request-merges/#squash-and-merge-your-pull-request-commits) by clicking the merge drop down menu, selecting **Squash and merge** and then clicking the **Squash and merge** button.
|
||||

|
||||
- [Rebase the commits individually onto the base branch](/articles/about-pull-request-merges/#rebase-and-merge-your-pull-request-commits) by clicking the merge drop down menu, selecting **Rebase and merge** and then clicking the **Rebase and merge** button.
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Rebase and merge will always update the committer information and create new commit SHAs. For more information, see "[About pull request merges](/articles/about-pull-request-merges#rebase-and-merge-your-pull-request-commits)."
|
||||
|
||||
{% endnote %}
|
||||
4. If prompted, type a commit message, or accept the default message.
|
||||
|
||||
{% data reusables.pull_requests.default-commit-message-squash-merge %}
|
||||

|
||||
|
||||
{% data reusables.files.choose-commit-email %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** The email selector is not available for rebase merges, which do not create a merge commit, or for squash merges, which credit the user who created the pull request as the author of the squashed commit.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
6. Click **Confirm merge**, **Confirm squash and merge**, or **Confirm rebase and merge**.
|
||||
6. Optionally, [delete the branch](/articles/deleting-unused-branches). This keeps the list of branches in your repository tidy.
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
To merge a pull request, use the `gh pr merge` subcommand. Replace `pull-request` with the number, URL, or head branch of the pull request.
|
||||
|
||||
```shell
|
||||
gh pr merge <em>pull-request</em>
|
||||
```
|
||||
|
||||
Follow the interactive prompts to complete the merge. For more information about the merge methods that you can choose, see "[About pull request merges](/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges)."
|
||||
|
||||
Alternatively, you can use flags to skip the interactive prompts. For example, this command will squash the commits into a single commit with the commit message "my squash commit", merge the squashed commit into the base branch, and then delete the local and remote branch.
|
||||
|
||||
```shell
|
||||
gh pr merge 523 --squash --body "my squash commit" --delete-branch
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Reverting a pull request](/articles/reverting-a-pull-request)"
|
||||
- "[Syncing your branch](/desktop/guides/contributing-to-projects/syncing-your-branch/)" using {% data variables.product.prodname_desktop %}
|
||||
- "[About pull request merges](/articles/about-pull-request-merges)"
|
||||
- "[Addressing merge conflicts](/articles/addressing-merge-conflicts)"
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
title: Reverting a pull request
|
||||
intro: You can revert a pull request after it's been merged to the upstream branch.
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/incorporating-changes-from-a-pull-request/reverting-a-pull-request
|
||||
- /articles/reverting-a-pull-request
|
||||
- /github/collaborating-with-issues-and-pull-requests/reverting-a-pull-request
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
## About reverting a pull request
|
||||
|
||||
Reverting a pull request on {% data variables.product.product_name %} creates a new pull request that contains one revert of the merge commit from the original merged pull request.
|
||||
|
||||
## Reverting a pull request
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You may need to revert the individual commits in your pull request if either of the following is true.
|
||||
|
||||
- Reverting the pull request causes merge conflicts
|
||||
- The original pull request was not originally merged on {% data variables.product.product_name %}. For example, someone could have merged the pull request using a fast-forward merge on the command line.
|
||||
|
||||
For more information about using Git to manually revert individual commits, see [Git revert](https://git-scm.com/docs/git-revert.html) in the Git documentation.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the "Pull Requests" list, click the pull request you'd like to revert.
|
||||
3. Near the bottom of the pull request, click **Revert**.
|
||||

|
||||
4. Merge the resulting pull request. For more information, see "[Merging a pull request](/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request)."
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Collaborating with pull requests
|
||||
intro: 'Track and discuss changes in issues, then propose and review changes in pull requests.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/
|
||||
- /categories/63/articles/
|
||||
- /categories/collaborating/
|
||||
- /categories/collaborating-on-projects-using-pull-requests/
|
||||
- /categories/collaborating-on-projects-using-issues-and-pull-requests/
|
||||
- /categories/collaborating-with-issues-and-pull-requests/
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
children:
|
||||
- /getting-started
|
||||
- /working-with-forks
|
||||
- /collaborating-on-repositories-with-code-quality-features
|
||||
- /proposing-changes-to-your-work-with-pull-requests
|
||||
- /addressing-merge-conflicts
|
||||
- /reviewing-changes-in-pull-requests
|
||||
- /incorporating-changes-from-a-pull-request
|
||||
shortTitle: Collaborate with pull requests
|
||||
---
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
---
|
||||
title: About branches
|
||||
intro: 'Use a branch to isolate development work without affecting other branches in the repository. Each repository has one default branch, and can have multiple other branches. You can merge a branch into another branch using a pull request.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches
|
||||
- /articles/working-with-protected-branches/
|
||||
- /articles/about-branches
|
||||
- /github/collaborating-with-issues-and-pull-requests/about-branches
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
## About branches
|
||||
|
||||
Branches allow you to develop features, fix bugs, or safely experiment with new ideas in a contained area of your repository.
|
||||
|
||||
You always create a branch from an existing branch. Typically, you might create a new branch from the default branch of your repository. You can then work on this new branch in isolation from changes that other people are making to the repository. A branch you create to build a feature is commonly referred to as a feature branch or topic branch. For more information, see "[Creating and deleting branches within your repository](/articles/creating-and-deleting-branches-within-your-repository/)."
|
||||
|
||||
You can also use a branch to publish a {% data variables.product.prodname_pages %} site. For more information, see "[About {% data variables.product.prodname_pages %}](/articles/what-is-github-pages)."
|
||||
|
||||
You must have write access to a repository to create a branch, open a pull request, or delete and restore branches in a pull request. For more information, see "[Access permissions on {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/access-permissions-on-github)."
|
||||
|
||||
## About the default branch
|
||||
|
||||
{% data reusables.branches.new-repo-default-branch %} The default branch is the branch that {% data variables.product.prodname_dotcom %} displays when anyone visits your repository. The default branch is also the initial branch that Git checks out locally when someone clones the repository. {% data reusables.branches.default-branch-automatically-base-branch %}
|
||||
|
||||
By default, {% data variables.product.product_name %} names the default branch `main` in any new repository.
|
||||
|
||||
{% data reusables.branches.change-default-branch %}
|
||||
|
||||
{% data reusables.branches.set-default-branch %}
|
||||
|
||||
## Working with branches
|
||||
|
||||
Once you're satisfied with your work, you can open a pull request to merge the changes in the current branch (the *head* branch) into another branch (the *base* branch). For more information, see "[About pull requests](/articles/about-pull-requests)."
|
||||
|
||||
After a pull request has been merged, or closed, you can delete the head branch as this is no longer needed. You must have write access in the repository to delete branches. You can't delete branches that are directly associated with open pull requests. For more information, see "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request)"
|
||||
|
||||
{% data reusables.pull_requests.retargeted-on-branch-deletion %}
|
||||
The following diagrams illustrate this.
|
||||
|
||||
Here someone has created a branch called `feature1` from the `master` branch, and you've then created a branch called `feature2` from `feature1`. There are open pull requests for both branches. The arrows indicate the current base branch for each pull request. At this point, `feature1` is the base branch for `feature2`. If the pull request for `feature2` is merged now, the `feature2` branch will be merged into `feature1`.
|
||||
|
||||

|
||||
|
||||
In the next diagram, someone has merged the pull request for `feature1` into the `master` branch, and they have deleted the `feature1` branch. As a result, {% data variables.product.prodname_dotcom %} has automatically retargeted the pull request for `feature2` so that its base branch is now `master`.
|
||||
|
||||

|
||||
|
||||
Now when you merge the `feature2` pull request, it'll be merged into the `master` branch.
|
||||
|
||||
## Working with protected branches
|
||||
|
||||
Repository administrators can enable protections on a branch. If you're working on a branch that's protected, you won't be able to delete or force push to the branch. Repository administrators can additionally enable several other protected branch settings to enforce various workflows before a branch can be merged.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you're a repository administrator, you can merge pull requests on branches with branch protections enabled even if the pull request does not meet the requirements, unless branch protections have been set to "Include administrators."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
To see if your pull request can be merged, look in the merge box at the bottom of the pull request's **Conversation** tab. For more information, see "[About protected branches](/articles/about-protected-branches)."
|
||||
|
||||
When a branch is protected:
|
||||
|
||||
- You won't be able to delete or force push to the branch.
|
||||
- If required status checks are enabled on the branch, you won't be able to merge changes into the branch until all of the required CI tests pass. For more information, see "[About status checks](/articles/about-status-checks)."
|
||||
- If required pull request reviews are enabled on the branch, you won't be able to merge changes into the branch until all requirements in the pull request review policy have been met. For more information, see "[Merging a pull request](/articles/merging-a-pull-request)."
|
||||
- If required review from a code owner is enabled on a branch, and a pull request modifies code that has an owner, a code owner must approve the pull request before it can be merged. For more information, see "[About code owners](/articles/about-code-owners)."
|
||||
- If required commit signing is enabled on a branch, you won't be able to push any commits to the branch that are not signed and verified. For more information, see "[About commit signature verification](/articles/about-commit-signature-verification)" and "[About protected branches](/github/administering-a-repository/about-protected-branches#require-signed-commits)."
|
||||
- If you use {% data variables.product.prodname_dotcom %}'s conflict editor to fix conflicts for a pull request that you created from a protected branch, {% data variables.product.prodname_dotcom %} helps you to create an alternative branch for the pull request, so that your resolution of the conflicts can be merged. For more information, see "[Resolving a merge conflict on {% data variables.product.prodname_dotcom %}](/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)."
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About pull requests](/articles/about-pull-requests)"
|
||||
- "[Branch](/articles/github-glossary/#branch)" in the {% data variables.product.prodname_dotcom %} glossary
|
||||
- "[Branches in a Nutshell](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell)" in the Git documentation
|
||||
@@ -1,71 +0,0 @@
|
||||
---
|
||||
title: About comparing branches in pull requests
|
||||
intro: Pull requests display diffs to compare the changes you made in your topic branch against the base branch that you want to merge your changes into.
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-comparing-branches-in-pull-requests
|
||||
- /articles/about-comparing-branches-in-pull-requests
|
||||
- /github/collaborating-with-issues-and-pull-requests/about-comparing-branches-in-pull-requests
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Compare branches
|
||||
---
|
||||
{% note %}
|
||||
|
||||
**Note:** When creating your pull request, you can change the base branch that you're comparing your changes against. For more information, see "[Creating a pull request](/articles/creating-a-pull-request#changing-the-branch-range-and-destination-repository)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
You can view proposed changes in a pull request in the Files changed tab.
|
||||

|
||||
|
||||
Rather than viewing the commits themselves, you can view the proposed changes as they'll appear in the files once the pull request is merged. The files appear in alphabetical order within the Files changed tab. Additions to the files appear in green and are prefaced by a `+` sign while content that has been removed appears in red and is prefaced by a `-` sign.
|
||||
|
||||
## Diff view options
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** If you're having a hard time understanding the context of a change, you can click **View** in the Files changed tab to view the whole file with the proposed changes.
|
||||
|
||||
{% endtip %}
|
||||
|
||||
You have several options for viewing a diff:
|
||||
- The unified view shows updated and existing content together in a linear view.
|
||||
- The split view shows old content on one side and new content on the other side.
|
||||
- The rich diff view shows a preview of how the changes will look once the pull request is merged.
|
||||
- The source view shows the changes in source without the formatting of the rich diff view.
|
||||
|
||||
You can also choose to ignore whitespace changes to get a more accurate view of the substantial changes in a pull request.
|
||||
|
||||

|
||||
|
||||
To simplify reviewing changes in a large pull request, you can filter the diff to only show selected file types, show files you are a CODEOWNER of, hide files you have already viewed, or hide deleted files. For more information, see "[Filtering files in a pull request by file type](/articles/filtering-files-in-a-pull-request)."
|
||||
|
||||

|
||||
|
||||
## Three-dot and two-dot Git diff comparisons
|
||||
|
||||
By default, pull requests on {% data variables.product.prodname_dotcom %} show a three-dot diff, or a comparison between the most recent version of the topic branch and the commit where the topic branch was last synced with the base branch.
|
||||
|
||||
To see two committish references in a two-dot diff comparison on {% data variables.product.prodname_dotcom %}, you can edit the URL of your repository's "Comparing changes" page. For more information, see the [Git Glossary for "committish"](https://git-scm.com/docs/gitglossary#gitglossary-aiddefcommit-ishacommit-ishalsocommittish) from the _Pro Git_ book site.
|
||||
|
||||
{% data reusables.repositories.two-dot-diff-comparison-example-urls %}
|
||||
|
||||
A two-dot diff compares two Git committish references, such as SHAs or OIDs (Object IDs), directly with each other. On {% data variables.product.prodname_dotcom %}, the Git committish references in a two-dot diff comparison must be pushed to the same repository or its forks.
|
||||
|
||||
If you want to simulate a two-dot diff in a pull request and see a comparison between the most recent versions of each branch, you can merge the base branch into your topic branch, which updates the last common ancestor between your branches.
|
||||
|
||||
For more information about Git commands to compare changes, see "[Git diff options](https://git-scm.com/docs/git-diff#git-diff-emgitdiffemltoptionsgtltcommitgtltcommitgt--ltpathgt82308203)" from the _Pro Git_ book site.
|
||||
|
||||
## Reasons diffs will not display
|
||||
- You've exceeded the total limit of files or certain file types. For more information, see "[About repositories](/repositories/creating-and-managing-repositories/about-repositories#limits-for-viewing-content-and-diffs-in-a-repository)."
|
||||
- Your file matches a rule in the repository's *.gitattributes* file to block that file from displaying by default. For more information, see "[Customizing how changed files appear on GitHub](/articles/customizing-how-changed-files-appear-on-github)."
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About pull requests](/articles/about-pull-requests)"
|
||||
- "[About forks](/articles/about-forks)"
|
||||
@@ -1,75 +0,0 @@
|
||||
---
|
||||
title: About pull requests
|
||||
intro: 'Pull requests let you tell others about changes you''ve pushed to a branch in a repository on {% data variables.product.product_name %}. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
|
||||
- /articles/using-pull-requests/
|
||||
- /articles/about-pull-requests
|
||||
- /github/collaborating-with-issues-and-pull-requests/about-pull-requests
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
## About pull requests
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** When working with pull requests, keep the following in mind:
|
||||
* If you're working in the [shared repository model](/articles/about-collaborative-development-models), we recommend that you use a topic branch for your pull request. While you can send pull requests from any branch or commit, with a topic branch you can push follow-up commits if you need to update your proposed changes.
|
||||
* When pushing commits to a pull request, don't force push. Force pushing can corrupt your pull request.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
You can create pull requests on {% data variables.product.prodname_dotcom_the_website %}, with {% data variables.product.prodname_desktop %}, in {% data variables.product.prodname_codespaces %}, on {% data variables.product.prodname_mobile %}, and when using GitHub CLI.
|
||||
|
||||
After initializing a pull request, you'll see a review page that shows a high-level overview of the changes between your branch (the compare branch) and the repository's base branch. You can add a summary of the proposed changes, review the changes made by commits, add labels, milestones, and assignees, and @mention individual contributors or teams. For more information, see "[Creating a pull request](/articles/creating-a-pull-request)."
|
||||
|
||||
Once you've created a pull request, you can push commits from your topic branch to add them to your existing pull request. These commits will appear in chronological order within your pull request and the changes will be visible in the "Files changed" tab.
|
||||
|
||||
Other contributors can review your proposed changes, add review comments, contribute to the pull request discussion, and even add commits to the pull request.
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
You can see information about the branch's current deployment status and past deployment activity on the "Conversation" tab. For more information, see "[Viewing deployment activity for a repository](/repositories/viewing-activity-and-data-for-your-repository/viewing-deployment-activity-for-your-repository)."
|
||||
{% endif %}
|
||||
|
||||
After you're happy with the proposed changes, you can merge the pull request. If you're working in a shared repository model, you create a pull request and you, or someone else, will merge your changes from your feature branch into the base branch you specify in your pull request. For more information, see "[Merging a pull request](/articles/merging-a-pull-request)."
|
||||
|
||||
{% data reusables.pull_requests.required-checks-must-pass-to-merge %}
|
||||
|
||||
{% data reusables.pull_requests.close-issues-using-keywords %}
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tips:**
|
||||
- To toggle between collapsing and expanding all outdated review comments in a pull request, hold down <span class="platform-mac"><kbd>option</kbd></span><span class="platform-linux"><kbd>Alt</kbd></span><span class="platform-windows"><kbd>Alt</kbd></span> and click **Show outdated** or **Hide outdated**. For more shortcuts, see "[Keyboard shortcuts](/articles/keyboard-shortcuts)."
|
||||
- You can squash commits when merging a pull request to gain a more streamlined view of changes. For more information, see "[About pull request merges](/articles/about-pull-request-merges)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
You can visit your dashboard to quickly find links to recently updated pull requests you're working on or subscribed to. For more information, see "[About your personal dashboard](/articles/about-your-personal-dashboard)."
|
||||
|
||||
## Draft pull requests
|
||||
|
||||
{% data reusables.gated-features.draft-prs %}
|
||||
|
||||
When you create a pull request, you can choose to create a pull request that is ready for review or a draft pull request. Draft pull requests cannot be merged, and code owners are not automatically requested to review draft pull requests. For more information about creating a draft pull request, see "[Creating a pull request](/articles/creating-a-pull-request)" and "[Creating a pull request from a fork](/articles/creating-a-pull-request-from-a-fork)."
|
||||
|
||||
{% data reusables.pull_requests.mark-ready-review %} You can convert a pull request to a draft at any time. For more information, see "[Changing the stage of a pull request](/articles/changing-the-stage-of-a-pull-request)."
|
||||
|
||||
## Differences between commits on compare and pull request pages
|
||||
|
||||
The compare and pull request pages use different methods to calculate the diff for changed files:
|
||||
|
||||
- Compare pages show the diff between the tip of the head ref and the current common ancestor (that is, the merge base) of the head and base ref.
|
||||
- Pull request pages show the diff between the tip of the head ref and the common ancestor of the head and base ref at the time when the pull request was created. Consequently, the merge base used for the comparison might be different.
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Pull request](/articles/github-glossary/#pull-request)" in the {% data variables.product.prodname_dotcom %} glossary
|
||||
- "[About branches](/articles/about-branches)"
|
||||
- "[Commenting on a pull request](/articles/commenting-on-a-pull-request)"
|
||||
- "[Closing a pull request](/articles/closing-a-pull-request)"
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: Changing the base branch of a pull request
|
||||
intro: 'After a pull request is opened, you can change the base branch to compare the changes in the pull request against a different branch.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request
|
||||
- /articles/changing-the-base-branch-of-a-pull-request
|
||||
- /github/collaborating-with-issues-and-pull-requests/changing-the-base-branch-of-a-pull-request
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Change the base branch
|
||||
---
|
||||
{% warning %}
|
||||
|
||||
**Warning**: When you change the base branch of your pull request, some commits may be removed from the timeline. Review comments may also become outdated, as the line of code that the comment referenced may no longer be part of the changes in the pull request.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the "Pull Requests" list, click the pull request you'd like to modify.
|
||||
3. Next to the pull request's title, click **Edit**. 
|
||||
4. In the base branch drop-down menu, select the base branch you'd like to [compare changes against](/github/committing-changes-to-your-project/comparing-commits#comparing-branches). 
|
||||
5. Read the information about changing the base branch and click **Change base**. 
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** When you open a pull request, {% data variables.product.product_name %} will set the base to the commit that branch references. If the branch is updated in the future, {% data variables.product.product_name %} will not update the base branch's commit.
|
||||
|
||||
{% endtip %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Creating a pull request](/articles/creating-a-pull-request)"
|
||||
- "[About pull requests](/articles/about-pull-requests)"
|
||||
- "[Reviewing proposed changes in a pull request](/articles/reviewing-proposed-changes-in-a-pull-request)"
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
title: Changing the stage of a pull request
|
||||
intro: 'You can mark a draft pull request as ready for review{% ifversion fpt or ghae or ghes or ghec %} or convert a pull request to a draft{% endif %}.'
|
||||
permissions: People with write permissions to a repository and pull request authors can change the stage of a pull request.
|
||||
product: '{% data reusables.gated-features.draft-prs %}'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request
|
||||
- /articles/changing-the-stage-of-a-pull-request
|
||||
- /github/collaborating-with-issues-and-pull-requests/changing-the-stage-of-a-pull-request
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Change the state
|
||||
---
|
||||
## Marking a pull request as ready for review
|
||||
|
||||
{% data reusables.pull_requests.mark-ready-review %}
|
||||
|
||||
{% ifversion fpt or ghae or ghes or ghec %}
|
||||
{% tip %}
|
||||
|
||||
**Tip**: You can also mark a pull request as ready for review using the {% data variables.product.prodname_cli %}. For more information, see "[`gh pr ready`](https://cli.github.com/manual/gh_pr_ready)" in the {% data variables.product.prodname_cli %} documentation.
|
||||
|
||||
{% endtip %}
|
||||
{% endif %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the "Pull requests" list, click the pull request you'd like to mark as ready for review.
|
||||
3. In the merge box, click **Ready for review**.
|
||||

|
||||
|
||||
{% ifversion fpt or ghae or ghes or ghec %}
|
||||
|
||||
## Converting a pull request to a draft
|
||||
|
||||
You can convert a pull request to a draft at any time. For example, if you accidentally opened a pull request instead of a draft, or if you've received feedback on your pull request that needs to be addressed, you can convert the pull request to a draft to indicate further changes are needed. No one can merge the pull request until you mark the pull request as ready for review again. People who are already subscribed to notifications for the pull request will not be unsubscribed when you convert the pull request to a draft.
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the "Pull requests" list, click the pull request you'd like to convert to a draft.
|
||||
3. In the right sidebar, under "Reviewers," click **Convert to draft**.
|
||||

|
||||
4. Click **Convert to draft**.
|
||||

|
||||
|
||||
{% endif %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About pull requests](/github/collaborating-with-issues-and-pull-requests/about-pull-requests)"
|
||||
@@ -1,94 +0,0 @@
|
||||
---
|
||||
title: Committing changes to a pull request branch created from a fork
|
||||
intro: You can commit changes on a pull request branch that was created from a fork of your repository with permission from the pull request creator.
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork
|
||||
- /articles/committing-changes-to-a-pull-request-branch-created-from-a-fork
|
||||
- /github/collaborating-with-issues-and-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Commit to PR branch from fork
|
||||
---
|
||||
You can only make commits on pull request branches that:
|
||||
- are opened in a repository that you have push access to and that were created from a fork of that repository
|
||||
- are on a user-owned fork
|
||||
- have permission granted from the pull request creator
|
||||
- don't have [branch restrictions](/github/administering-a-repository/about-protected-branches#restrict-who-can-push-to-matching-branches) that will prevent you from committing
|
||||
|
||||
Only the user who created the pull request can give you permission to push commits to the user-owned fork. For more information, see "[Allowing changes to a pull request branch created from a fork](/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You can also make commits to a pull request branch from a fork of your repository through {% data variables.product.product_location %} by creating your own copy (or fork) of the fork of your repository and committing changes to the same head branch that the original pull request changes were created on. For some general guidelines, see "[Creating a pull request from a fork](/articles/creating-a-pull-request-from-a-fork)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
1. On {% data variables.product.product_name %}, navigate to the main page of the fork (or copy of your repository) where the pull request branch was created.
|
||||
{% data reusables.repositories.copy-clone-url %}
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
{% tip %}
|
||||
|
||||
**Tip:** If you prefer to clone the fork using {% data variables.product.prodname_desktop %}, then see "[Cloning a repository to {% data variables.product.prodname_desktop %}](/articles/cloning-a-repository/#cloning-a-repository-to-github-desktop)."
|
||||
|
||||
{% endtip %}
|
||||
4. Change the current working directory to the location where you want to download the cloned directory.
|
||||
```shell
|
||||
$ cd open-source-projects
|
||||
```
|
||||
5. Type `git clone`, and then paste the URL you copied in Step 3.
|
||||
```shell
|
||||
$ git clone https://{% data variables.command_line.codeblock %}/<em>USERNAME</em>/<em>FORK-OF-THE-REPOSITORY</em>
|
||||
```
|
||||
6. Press **Enter**. Your local clone will be created.
|
||||
```shell
|
||||
$ git clone https://{% data variables.command_line.codeblock %}/<em>USERNAME</em>/<em>FORK-OF-THE-REPOSITORY</em>
|
||||
> Cloning into `FORK-OF-THE-REPOSITORY`...
|
||||
> remote: Counting objects: 10, done.
|
||||
> remote: Compressing objects: 100% (8/8), done.
|
||||
> remove: Total 10 (delta 1), reused 10 (delta 1)
|
||||
> Unpacking objects: 100% (10/10), done.
|
||||
```
|
||||
{% tip %}
|
||||
|
||||
**Tip:** The error message "fatal: destination path 'REPOSITORY-NAME' already exists and is not an empty directory" means that your current working directory already contains a repository with the same name. To resolve the error, you must clone the fork in a different directory.
|
||||
|
||||
{% endtip %}
|
||||
7. Navigate into your new cloned repository.
|
||||
```shell
|
||||
$ cd <em>FORK-OF-THE-REPOSITORY</em>
|
||||
```
|
||||
7. Switch branches to the compare branch of the pull request where the original changes were made. If you navigate to the original pull request, you'll see the compare branch at the top of the pull request.
|
||||

|
||||
In this example, the compare branch is `test-branch`:
|
||||
```shell
|
||||
$ git checkout <em>test-branch</em>
|
||||
```
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** For more information about pull request branches, including examples, see "[Creating a Pull Request](/articles/creating-a-pull-request/#changing-the-branch-range-and-destination-repository)."
|
||||
|
||||
{% endtip %}
|
||||
8. At this point, you can do anything you want with this branch. You can push new commits to it, run some local tests, or merge other branches into the branch. Make modifications as you like.
|
||||
9. After you commit your changes to the head branch of the pull request you can push your changes up to the original pull request directly. In this example, the head branch is `test-branch`:
|
||||
```shell
|
||||
$ git push origin <em>test-branch</em>
|
||||
> Counting objects: 32, done.
|
||||
> Delta compression using up to 8 threads.
|
||||
> Compressing objects: 100% (26/26), done.
|
||||
> Writing objects: 100% (29/29), 74.94 KiB | 0 bytes/s, done.
|
||||
> Total 29 (delta 8), reused 0 (delta 0)
|
||||
> To https://{% data variables.command_line.codeblock %}/<em>USERNAME</em>/<em>FORK-OF-THE-REPOSITORY</em>.git
|
||||
> 12da2e9..250e946 <em>test-branch</em> -> <em>test-branch</em>
|
||||
```
|
||||
|
||||
Your new commits will be reflected on the original pull request on {% data variables.product.product_location %}.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- "[About forks](/articles/about-forks)"
|
||||
@@ -1,41 +0,0 @@
|
||||
---
|
||||
title: Creating a pull request from a fork
|
||||
intro: You can create a pull request to propose changes you've made to a fork of an upstream repository.
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork
|
||||
- /articles/creating-a-pull-request-from-a-fork
|
||||
- /github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork
|
||||
permissions: 'Anyone with write access to a repository can create a pull request from a user-owned fork. {% data reusables.enterprise-accounts.emu-permission-propose %}'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Create a PR from a fork
|
||||
---
|
||||
You can also give the upstream repository's maintainers permission to push commits to a user-owned fork. If your pull request compares your topic branch with a branch in the upstream repository as the base branch, then your topic branch is also called the compare branch of the pull request. For more information about pull request branches, including examples, see "[Creating a pull request](/articles/creating-a-pull-request/#changing-the-branch-range-and-destination-repository)."
|
||||
|
||||
{% data reusables.pull_requests.perms-to-open-pull-request %}
|
||||
|
||||
1. Navigate to the original repository where you created your fork.
|
||||
{% data reusables.repositories.new-pull-request %}
|
||||
3. On the Compare page, click **compare across forks**.
|
||||

|
||||
4. In the "base branch" drop-down menu, select the branch of the upstream repository you'd like to merge changes into.
|
||||

|
||||
5. In the "head fork" drop-down menu, select your fork, then use the "compare branch" drop-down menu to select the branch you made your changes in.
|
||||

|
||||
{% data reusables.repositories.pr-title-description %}
|
||||
{% data reusables.repositories.allow-maintainers-user-forks %}
|
||||
|
||||

|
||||
{% data reusables.repositories.create-pull-request %}
|
||||
|
||||
{% data reusables.repositories.asking-for-review %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Working with forks](/articles/working-with-forks)"
|
||||
- "[Allowing changes to a pull request branch created from a fork](/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)"
|
||||
@@ -1,178 +0,0 @@
|
||||
---
|
||||
title: Creating a pull request
|
||||
intro: 'Create a pull request to propose and collaborate on changes to a repository. These changes are proposed in a *branch*, which ensures that the default branch only contains finished and approved work.'
|
||||
permissions: 'Anyone with read access to a repository can create a pull request. {% data reusables.enterprise-accounts.emu-permission-propose %}'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
|
||||
- /articles/creating-a-pull-request
|
||||
- /github/collaborating-with-issues-and-pull-requests/creating-a-pull-request
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
If you want to create a new branch for your pull request and do not have write permissions to the repository, you can fork the repository first. For more information, see "[Creating a pull request from a fork](/articles/creating-a-pull-request-from-a-fork)" and "[About forks](/articles/about-forks)."
|
||||
|
||||
You can specify which branch you'd like to merge your changes into when you create your pull request. Pull requests can only be opened between two branches that are different.
|
||||
|
||||
{% data reusables.pull_requests.perms-to-open-pull-request %}
|
||||
|
||||
{% data reusables.pull_requests.close-issues-using-keywords %}
|
||||
|
||||
## Changing the branch range and destination repository
|
||||
|
||||
By default, pull requests are based on the parent repository's default branch. For more information, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)."
|
||||
|
||||
If the default parent repository isn't correct, you can change both the parent repository and the branch with the drop-down lists. You can also swap your head and base branches with the drop-down lists to establish diffs between reference points. References here must be branch names in your GitHub repository.
|
||||
|
||||

|
||||
|
||||
When thinking about branches, remember that the *base branch* is **where** changes should be applied, the *head branch* contains **what** you would like to be applied.
|
||||
|
||||
When you change the base repository, you also change notifications for the pull request. Everyone that can push to the base repository will receive an email notification and see the new pull request in their dashboard the next time they sign in.
|
||||
|
||||
When you change any of the information in the branch range, the Commit and Files changed preview areas will update to show your new range.
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tips**:
|
||||
- Using the compare view, you can set up comparisons across any timeframe. For more information, see "[Comparing commits](/github/committing-changes-to-your-project/comparing-commits)."
|
||||
- Project maintainers can add a pull request template for a repository. Templates include prompts for information in the body of a pull request. For more information, see "[About issue and pull request templates](/articles/about-issue-and-pull-request-templates)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
## Creating the pull request
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
2. In the "Branch" menu, choose the branch that contains your commits.
|
||||

|
||||
{% data reusables.repositories.new-pull-request %}
|
||||
4. Use the _base_ branch dropdown menu to select the branch you'd like to merge your changes into, then use the _compare_ branch drop-down menu to choose the topic branch you made your changes in.
|
||||

|
||||
{% data reusables.repositories.pr-title-description %}
|
||||
{% data reusables.repositories.create-pull-request %}
|
||||
|
||||
{% data reusables.repositories.asking-for-review %}
|
||||
|
||||
After your pull request has been reviewed, it can be [merged into the repository](/articles/merging-a-pull-request).
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
To create a pull request, use the `gh pr create` subcommand.
|
||||
|
||||
```shell
|
||||
gh pr create
|
||||
```
|
||||
|
||||
To assign a pull request to an individual, use the `--assignee` or `-a` flags. You can use `@me` to self-assign the pull request.
|
||||
|
||||
```shell
|
||||
gh pr create --assignee "@octocat"
|
||||
```
|
||||
|
||||
To specify the branch into which you want the pull request merged, use the `--base` or `-B` flags. To specify the branch that contains commits for your pull request, use the `--head` or `-H` flags.
|
||||
|
||||
```shell
|
||||
gh pr create --base my-base-branch --head my-changed-branch
|
||||
```
|
||||
|
||||
To include a title and body for the new pull request, use the `--title` and `--body` flags.
|
||||
|
||||
```shell
|
||||
gh pr create --title "The bug is fixed" --body "Everything works again"
|
||||
```
|
||||
|
||||
To mark a pull request as a draft, use the `--draft` flag.
|
||||
|
||||
```shell
|
||||
gh pr create --draft
|
||||
```
|
||||
|
||||
To add a labels or milestones to the new pull request, use the `--label` and `--milestone` flags.
|
||||
|
||||
```shell
|
||||
gh pr create --label "bug,help wanted" --milestone octocat-milestone
|
||||
```
|
||||
|
||||
To add the new pull request to a specific project, use the `--project` flag.
|
||||
|
||||
```shell
|
||||
gh pr create --project octocat-project
|
||||
```
|
||||
|
||||
To assign an individual or team as reviewers, use the `--reviewer` flag.
|
||||
|
||||
```shell
|
||||
gh pr create --reviewer monalisa,hubot --reviewer myorg/team-name
|
||||
```
|
||||
|
||||
To create the pull request in your default web browser, use the `--web` flag.
|
||||
|
||||
```shell
|
||||
gh pr create --web
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
|
||||
{% desktop %}
|
||||
|
||||
{% mac %}
|
||||
|
||||
1. Switch to the branch that you want to create a pull request for. For more information, see "[Switching between branches](/desktop/contributing-and-collaborating-using-github-desktop/managing-branches#switching-between-branches)."
|
||||
2. Click **Create Pull Request**. {% data variables.product.prodname_desktop %} will open your default browser to take you to {% data variables.product.prodname_dotcom %}.
|
||||

|
||||
4. On {% data variables.product.prodname_dotcom %}, confirm that the branch in the **base:** drop-down menu is the branch where you want to merge your changes. Confirm that the branch in the **compare:** drop-down menu is the topic branch where you made your changes.
|
||||

|
||||
{% data reusables.repositories.pr-title-description %}
|
||||
{% data reusables.repositories.create-pull-request %}
|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||
1. Switch to the branch that you want to create a pull request for. For more information, see "[Switching between branches](/desktop/contributing-and-collaborating-using-github-desktop/managing-branches#switching-between-branches)."
|
||||
2. Click **Create Pull Request**. {% data variables.product.prodname_desktop %} will open your default browser to take you to {% data variables.product.prodname_dotcom %}.
|
||||

|
||||
3. On {% data variables.product.prodname_dotcom %}, confirm that the branch in the **base:** drop-down menu is the branch where you want to merge your changes. Confirm that the branch in the **compare:** drop-down menu is the topic branch where you made your changes.
|
||||

|
||||
{% data reusables.repositories.pr-title-description %}
|
||||
{% data reusables.repositories.create-pull-request %}
|
||||
|
||||
{% endwindows %}
|
||||
|
||||
{% enddesktop %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
{% codespaces %}
|
||||
|
||||
1. Once you've committed changes to your local copy of the repository, click the **Create Pull Request** icon.
|
||||

|
||||
1. Check that the local branch and repository you're merging from, and the remote branch and repository you're merging into, are correct. Then give the pull request a title and a description.
|
||||

|
||||
1. Click **Create**.
|
||||
|
||||
For more information on creating pull requests in {% data variables.product.prodname_codespaces %}, see "[Using Codespaces for pull requests](/codespaces/developing-in-codespaces/using-codespaces-for-pull-requests)."
|
||||
|
||||
{% endcodespaces %}
|
||||
|
||||
{% endif %}
|
||||
## Further reading
|
||||
|
||||
- "[Creating a pull request from a fork](/articles/creating-a-pull-request-from-a-fork)"
|
||||
- "[Changing the base branch of a pull request](/articles/changing-the-base-branch-of-a-pull-request)"
|
||||
- "[Adding issues and pull requests to a project board from the sidebar](/articles/adding-issues-and-pull-requests-to-a-project-board/#adding-issues-and-pull-requests-to-a-project-board-from-the-sidebar)"
|
||||
- "[About automation for issues and pull requests with query parameters](/issues/tracking-your-work-with-issues/creating-issues/about-automation-for-issues-and-pull-requests-with-query-parameters)"
|
||||
- "[Assigning issues and pull requests to other GitHub users](/issues/tracking-your-work-with-issues/managing-issues/assigning-issues-and-pull-requests-to-other-github-users)"
|
||||
- "[Writing on GitHub](/github/writing-on-github)"
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
title: Creating and deleting branches within your repository
|
||||
intro: 'You can create or delete branches directly on {% data variables.product.product_name %}.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository
|
||||
- /articles/deleting-branches-in-a-pull-request/
|
||||
- /articles/creating-and-deleting-branches-within-your-repository
|
||||
- /github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Create & delete branches
|
||||
---
|
||||
## Creating a branch
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
|
||||
1. Optionally, if you want to create your new branch from a branch other than the default branch for the repository, click {% octicon "git-branch" aria-label="The branch icon" %} **<em>NUMBER</em> branches** then choose another branch:
|
||||

|
||||
1. Click the branch selector menu.
|
||||

|
||||
1. Type a unique name for your new branch, then select **Create branch**.
|
||||

|
||||
|
||||
## Deleting a branch
|
||||
|
||||
{% data reusables.pull_requests.automatically-delete-branches %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If the branch you want to delete is the repository's default branch, you must choose a new default branch before deleting the branch. For more information, see "[Changing the default branch](/github/administering-a-repository/changing-the-default-branch)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
If the branch you want to delete is associated with an open pull request, you must merge or close the pull request before deleting the branch. For more information, see "[Merging a pull request](/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request)" or "[Closing a pull request](/github/collaborating-with-issues-and-pull-requests/closing-a-pull-request)."
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.navigate-to-branches %}
|
||||
1. Scroll to the branch that you want to delete, then click {% octicon "trash" aria-label="The trash icon to delete the branch" %}.
|
||||

|
||||
|
||||
{% data reusables.pull_requests.retargeted-on-branch-deletion %}
|
||||
For more information, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#working-with-branches)."
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches)"
|
||||
- "[Viewing branches in your repository](/github/administering-a-repository/viewing-branches-in-your-repository)"
|
||||
- "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request)"
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Proposing changes to your work with pull requests
|
||||
intro: 'After you add changes to a topic branch or fork, you can open a pull request to ask your collaborators or the repository administrator to review your changes before merging them into the project.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/
|
||||
- /articles/proposing-changes-to-your-work-with-pull-requests
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
children:
|
||||
- /about-branches
|
||||
- /creating-and-deleting-branches-within-your-repository
|
||||
- /about-pull-requests
|
||||
- /about-comparing-branches-in-pull-requests
|
||||
- /creating-a-pull-request
|
||||
- /creating-a-pull-request-from-a-fork
|
||||
- /using-query-parameters-to-create-a-pull-request
|
||||
- /changing-the-stage-of-a-pull-request
|
||||
- /requesting-a-pull-request-review
|
||||
- /changing-the-base-branch-of-a-pull-request
|
||||
- /committing-changes-to-a-pull-request-branch-created-from-a-fork
|
||||
shortTitle: Propose changes
|
||||
---
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
---
|
||||
title: Requesting a pull request review
|
||||
intro: 'After you create a pull request, you can ask a specific person to review the changes you''ve proposed. If you''re an organization member, you can also request a specific team to review your changes.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review
|
||||
- /articles/requesting-a-pull-request-review
|
||||
- /github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Request a PR review
|
||||
---
|
||||
Owners and collaborators on a repository owned by a user account can assign pull request reviews. Organization members with triage permissions to a repository can assign a pull request review.
|
||||
|
||||
Owners or collaborators can assign a pull request review to any person that has been explicitly granted [read access](/articles/access-permissions-on-github) to a user-owned repository. Organization members can assign a pull request review to any person or team with read access to a repository. The requested reviewer or team will receive a notification that you asked them to review the pull request. {% ifversion fpt or ghae or ghes or ghec %}If you request a review from a team and code review assignment is enabled, specific members will be requested and the team will be removed as a reviewer. For more information, see "[Managing code review assignment for your team](/organizations/organizing-members-into-teams/managing-code-review-assignment-for-your-team)."{% endif %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Pull request authors can't request reviews unless they are either a repository owner or collaborator with write access to the repository.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
You can request a review from either a suggested or specific person. Suggested reviewers are based on [git blame data](/articles/tracking-changes-in-a-file/). If you request a review, other people with read access to the repository can still review your pull request. Once someone has reviewed your pull request and you've made the necessary changes, you can re-request review from the same reviewer. If the requested reviewer does not submit a review, and the pull request meets the repository's [mergeability requirements](/articles/defining-the-mergeability-of-pull-requests), you can still merge the pull request.
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the list of pull requests, click the pull request that you'd like to ask a specific person or a team to review.
|
||||
3. Navigate to **Reviewers** in the right sidebar.
|
||||
4. To request a review from a suggested person under **Reviewers**, next to their username, click **Request**.
|
||||

|
||||
5. Optionally, to request a review from someone other than a suggested person, click **Reviewers**, then click on a name in the dropdown menu.
|
||||

|
||||
6. Optionally, if you know the name of the person or team you'd like a review from, click **Reviewers**, then type the username of the person or the name of the team you're asking to review your changes. Click their team name or username to request a review.
|
||||

|
||||
7. After your pull request is reviewed and you've made the necessary changes, you can ask a reviewer to re-review your pull request. Navigate to **Reviewers** in the right sidebar and click {% octicon "sync" aria-label="The sync icon" %} next to the reviewer's name whose review you'd like.
|
||||

|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About pull request reviews](/articles/about-pull-request-reviews)"
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
title: Using query parameters to create a pull request
|
||||
intro: Use query parameters to create custom URLs to open pull requests with pre-populated fields.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
---
|
||||
|
||||
You can use query parameters to open pull requests. Query parameters are optional parts of a URL you can customize to share a specific web page view, such as search filter results or a pull request template on {% data variables.product.prodname_dotcom %}. To create your own query parameters, you must match the key and value pair.
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** You can also create pull request templates that open with default labels, assignees, and an pull request title. For more information, see "[Using templates to encourage useful issues and pull requests](/communities/using-templates-to-encourage-useful-issues-and-pull-requests)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
You must have the proper permissions for any action to use the equivalent query parameter. For example, you must have permission to add a label to a pull request to use the `labels` query parameter. For more information, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)."
|
||||
|
||||
If you create an invalid URL using query parameters, or if you don’t have the proper permissions, the URL will return a `404 Not Found` error page. If you create a URL that exceeds the server limit, the URL will return a `414 URI Too Long` error page.
|
||||
|
||||
Query parameter | Example
|
||||
--- | ---
|
||||
`quick_pull` | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1` creates a pull request that compares the base branch `main` and head branch `my-branch`. The `quick_pull=1` query brings you directly to the "Open a pull request" page.
|
||||
`title` | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&labels=bug&title=Bug+fix+report` creates a pull request with the label "bug" and title "Bug fix."
|
||||
`body` | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&title=Bug+fix&body=Describe+the+fix.` creates a pull request with the title "Bug fix" and the comment "Describe the fix" in the pull request body.
|
||||
`labels` | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&labels=help+wanted,bug` creates a pull request with the labels "help wanted" and "bug".
|
||||
`milestone` | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&milestone=testing+milestones` creates a pull request with the milestone "testing milestones."
|
||||
`assignees` | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&assignees=octocat` creates a pull request and assigns it to @octocat.
|
||||
`projects` | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&title=Bug+fix&projects=octo-org/1` creates a pull request with the title "Bug fix" and adds it to the organization's project board 1.
|
||||
`template` | `https://github.com/octo-org/octo-repo/compare/main...my-branch?quick_pull=1&template=issue_template.md` creates a pull request with a template in the pull request body. The `template` query parameter works with templates stored in a `PULL_REQUEST_TEMPLATE` subdirectory within the root, `docs/` or `.github/` directory in a repository. For more information, see "[Using templates to encourage useful issues and pull requests](/communities/using-templates-to-encourage-useful-issues-and-pull-requests)."
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
title: About pull request reviews
|
||||
intro: 'Reviews allow collaborators to comment on the changes proposed in pull requests, approve the changes, or request further changes before the pull request is merged. Repository administrators can require that all pull requests are approved before being merged.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews
|
||||
- /articles/about-pull-request-reviews
|
||||
- /github/collaborating-with-issues-and-pull-requests/about-pull-request-reviews
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: About PR reviews
|
||||
---
|
||||
## About pull request reviews
|
||||
|
||||
After a pull request is opened, anyone with *read* access can review and comment on the changes it proposes. You can also suggest specific changes to lines of code, which the author can apply directly from the pull request. For more information, see "[Reviewing proposed changes in a pull request](/articles/reviewing-proposed-changes-in-a-pull-request)."
|
||||
|
||||
Repository owners and collaborators can request a pull request review from a specific person. Organization members can also request a pull request review from a team with read access to the repository. For more information, see "[Requesting a pull request review](/articles/requesting-a-pull-request-review)." {% ifversion fpt or ghae or ghes or ghec %}You can specify a subset of team members to be automatically assigned in the place of the whole team. For more information, see "[Managing code review assignment for your team](/organizations/organizing-members-into-teams/managing-code-review-assignment-for-your-team)."{% endif %}
|
||||
|
||||
Reviews allow for discussion of proposed changes and help ensure that the changes meet the repository's contributing guidelines and other quality standards. You can define which individuals or teams own certain types or areas of code in a CODEOWNERS file. When a pull request modifies code that has a defined owner, that individual or team will automatically be requested as a reviewer. For more information, see "[About code owners](/articles/about-code-owners/)."
|
||||
|
||||
{% ifversion fpt or ghec %}You can schedule reminders for pull requests that need to be reviewed. For more information, see "[Managing scheduled reminders for pull requests](/github/setting-up-and-managing-organizations-and-teams/managing-scheduled-reminders-for-pull-requests)."{% endif %}
|
||||
|
||||

|
||||
|
||||
A review has three possible statuses:
|
||||
- **Comment**: Submit general feedback without explicitly approving the changes or requesting additional changes.
|
||||
- **Approve**: Submit feedback and approve merging the changes proposed in the pull request.
|
||||
- **Request changes**: Submit feedback that must be addressed before the pull request can be merged.
|
||||
|
||||

|
||||
|
||||
{% data reusables.repositories.request-changes-tips %}
|
||||
|
||||
You can view all of the reviews a pull request has received in the Conversation timeline, and you can see reviews by repository owners and collaborators in the pull request's merge box.
|
||||
|
||||

|
||||
|
||||
{% data reusables.search.requested_reviews_search_tip %}
|
||||
|
||||
{% data reusables.pull_requests.resolving-conversations %}
|
||||
|
||||
## Re-requesting a review
|
||||
|
||||
{% data reusables.pull_requests.re-request-review %}
|
||||
|
||||
## Required reviews
|
||||
|
||||
{% data reusables.pull_requests.required-reviews-for-prs-summary %} For more information, see "[About protected branches](/github/administering-a-repository/about-protected-branches#require-pull-request-reviews-before-merging)."
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip**: If necessary, people with *admin* or *write* access to a repository can dismiss a pull request review. For more information, see "[Dismissing a pull request review](/articles/dismissing-a-pull-request-review)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Reviewing proposed changes in a pull request](/articles/reviewing-proposed-changes-in-a-pull-request)"
|
||||
- "[Viewing a pull request review](/articles/viewing-a-pull-request-review)"
|
||||
- "[Setting guidelines for repository contributors](/articles/setting-guidelines-for-repository-contributors)"
|
||||
@@ -1,43 +0,0 @@
|
||||
---
|
||||
title: Approving a pull request with required reviews
|
||||
intro: 'If your repository requires reviews, pull requests must have a specific number of approving reviews from people with _write_ or _admin_ permissions in the repository before they can be merged.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/approving-a-pull-request-with-required-reviews
|
||||
- /articles/approving-a-pull-request-with-required-reviews
|
||||
- /github/collaborating-with-issues-and-pull-requests/approving-a-pull-request-with-required-reviews
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Required reviews
|
||||
---
|
||||
For more information about required reviews, see "[About protected branches](/github/administering-a-repository/about-protected-branches#require-pull-request-reviews-before-merging)."
|
||||
|
||||
You can comment on a pull request, approve the changes, or request improvements before approving. For more information, see "[Reviewing proposed changes in a pull request](/articles/reviewing-proposed-changes-in-a-pull-request)."
|
||||
|
||||
{% data reusables.search.requested_reviews_search %}
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip**: If a pull request you approved has changed significantly, you can dismiss your review. The pull request will need a new review before it can be merged. For more information, see "[Dismissing a pull request review](/articles/dismissing-a-pull-request-review)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
{% data reusables.repositories.choose-pr-review %}
|
||||
{% data reusables.repositories.changed-files %}
|
||||
4. Review the changes in the pull request, and optionally, [comment on specific lines](/articles/reviewing-proposed-changes-in-a-pull-request/#starting-a-review).
|
||||
{% data reusables.repositories.review-changes %}
|
||||
{% data reusables.repositories.review-summary-comment %}
|
||||
7. Select **Approve** to approve merging the changes proposed in the pull request.
|
||||
{% data reusables.repositories.submit-review %}
|
||||
|
||||
{% data reusables.repositories.request-changes-tips %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Reviewing proposed changes in a pull request](/articles/reviewing-proposed-changes-in-a-pull-request)"
|
||||
- "[Commenting on a pull request](/articles/commenting-on-a-pull-request)"
|
||||
@@ -1,101 +0,0 @@
|
||||
---
|
||||
title: Checking out pull requests locally
|
||||
intro: 'When someone sends you a pull request from a fork or branch of your repository, you can merge it locally to resolve a merge conflict or to test and verify the changes before merging on {% data variables.product.product_name %}.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
|
||||
- /articles/checking-out-pull-requests-locally
|
||||
- /github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally
|
||||
permissions: Anyone with write access to a repository can pull a remote pull request down locally.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Check out a PR locally
|
||||
---
|
||||
{% note %}
|
||||
|
||||
**Note:** Pull request authors can give upstream repository maintainers, or those with push access to the upstream repository, permission to make commits to their pull request's compare branch in a user-owned fork. For more information, see "[Allowing changes to a pull request branch created from a fork](/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Modifying an active pull request locally
|
||||
|
||||
{% include tool-switcher %}
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the list of pull requests, click the pull request you'd like to modify.{% ifversion fpt or ghec %}
|
||||
3. To choose where you'd like to open the pull request, select the **Open with {% octicon "triangle-down" aria-label="The down triangle icon" %}** drop-down and click one of the tabs.
|
||||
{% else %}
|
||||
3. In the merge box, click **command line instructions**. Follow the sequence of steps to bring down the proposed pull request.
|
||||

|
||||
4. Optionally, to view proposed changes in {% data variables.product.prodname_desktop %}, click **open this in {% data variables.product.prodname_desktop %}**.
|
||||
{% endif %}
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
To check out a pull request locally, use the `gh pr checkout` subcommand. Replace `pull-request` with the number, URL, or head branch of the pull request.
|
||||
|
||||
```shell
|
||||
gh pr checkout <em>pull-request</em>
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
|
||||
## Modifying an inactive pull request locally
|
||||
|
||||
If a pull request's author is unresponsive to requests or has deleted their fork, the pull request can still be merged. However, if you want to make changes to a pull request and the author is not responding, you'll need to perform some additional steps to update the pull request.
|
||||
|
||||
Once a pull request is opened, {% data variables.product.product_name %} stores all of the changes remotely. In other words, commits in a pull request are available in a repository even before the pull request is merged. You can fetch an open pull request and recreate it as your own.
|
||||
|
||||
Anyone can work with a previously opened pull request to continue working on it, test it out, or even open a new pull request with additional changes. However, only collaborators with push access can merge pull requests.
|
||||
|
||||
{% data reusables.repositories.sidebar-issue-pr %}
|
||||
2. In the "Pull Requests" list, click the pull request you'd like to merge.
|
||||
3. Find the ID number of the inactive pull request. This is the sequence of digits right after the pull request's title.
|
||||

|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
5. Fetch the reference to the pull request based on its ID number, creating a new branch in the process.
|
||||
```shell
|
||||
$ git fetch origin pull/<em>ID</em>/head:<em>BRANCHNAME</em>
|
||||
```
|
||||
6. Switch to the new branch that's based on this pull request:
|
||||
```shell
|
||||
[main] $ git checkout <em>BRANCHNAME</em>
|
||||
> Switched to a new branch '<em>BRANCHNAME</em>'
|
||||
```
|
||||
7. At this point, you can do anything you want with this branch. You can run some local tests, or merge other branches into the branch.
|
||||
8. When you're ready, you can push the new branch up:
|
||||
```shell
|
||||
[pull-inactive-pull-request] $ git push origin <em>BRANCHNAME</em>
|
||||
> Counting objects: 32, done.
|
||||
> Delta compression using up to 8 threads.
|
||||
> Compressing objects: 100% (26/26), done.
|
||||
> Writing objects: 100% (29/29), 74.94 KiB | 0 bytes/s, done.
|
||||
> Total 29 (delta 8), reused 0 (delta 0)
|
||||
> To https://{% data variables.command_line.codeblock %}/<em>username</em>/<em>repository</em>.git
|
||||
> * [new branch] <em>BRANCHNAME</em> -> <em>BRANCHNAME</em>
|
||||
```
|
||||
9. [Create a new pull request](/articles/creating-a-pull-request) with your new branch.
|
||||
|
||||
## Error: Failed to push some refs
|
||||
|
||||
The remote `refs/pull/` namespace is *read-only*. If you try to push any commits there, you'll see this error:
|
||||
```shell
|
||||
! [remote rejected] HEAD -> refs/pull/1/head (deny updating a hidden ref)
|
||||
error: failed to push some refs to 'git@github.local:<em>USERNAME</em>/<em>REPOSITORY</em>.git'
|
||||
```
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** When you remove or rename a remote reference, your local `refs/pull/origin/` namespace will not be affected by calls to `git-remote`.
|
||||
|
||||
{% endtip %}
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
title: Commenting on a pull request
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request
|
||||
- /articles/adding-commit-comments/
|
||||
- /articles/commenting-on-the-diff-of-a-pull-request/
|
||||
- /articles/commenting-on-differences-between-files/
|
||||
- /articles/commenting-on-a-pull-request
|
||||
- /github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request
|
||||
intro: 'After you open a pull request in a repository, collaborators or team members can comment on the comparison of files between the two specified branches, or leave general comments on the project as a whole.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Comment on a PR
|
||||
---
|
||||
## About pull request comments
|
||||
|
||||
You can comment on a pull request's **Conversation** tab to leave general comments, questions, or props. You can also suggest changes that the author of the pull request can apply directly from your comment.
|
||||
|
||||

|
||||
|
||||
You can also comment on specific sections of a file on a pull request's **Files changed** tab in the form of individual line comments or as part of a [pull request review](/articles/about-pull-request-reviews). Adding line comments is a great way to discuss questions about implementation or provide feedback to the author.
|
||||
|
||||
For more information on adding line comments to a pull request review, see ["Reviewing proposed changes in a pull request."](/articles/reviewing-proposed-changes-in-a-pull-request)
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you reply to a pull request via email, your comment will be added on the **Conversation** tab and will not be part of a pull request review.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
To reply to an existing line comment, you'll need to navigate to the comment on either the **Conversation** tab or **Files changed** tab and add an additional line comment below it.
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tips:**
|
||||
- Pull request comments support the same [formatting](/categories/writing-on-github) as regular comments on {% data variables.product.product_name %}, such as @mentions, emoji, and references.
|
||||
- You can add reactions to comments in pull requests in the **Files changed** tab.
|
||||
|
||||
{% endtip %}
|
||||
|
||||
## Adding line comments to a pull request
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the list of pull requests, click the pull request where you'd like to leave line comments.
|
||||
{% data reusables.repositories.changed-files %}
|
||||
{% data reusables.repositories.start-line-comment %}
|
||||
{% data reusables.repositories.type-line-comment %}
|
||||
{% data reusables.repositories.suggest-changes %}
|
||||
5. When you're done, click **Add single comment**.
|
||||

|
||||
|
||||
Anyone watching the pull request or repository will receive a notification of your comment.
|
||||
|
||||
{% data reusables.pull_requests.resolving-conversations %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Writing on GitHub](/github/writing-on-github)"
|
||||
{% ifversion fpt or ghec %}- "[Reporting abuse or spam](/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam)"
|
||||
{% endif %}
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
title: Dismissing a pull request review
|
||||
intro: 'If your repository requires reviews, you can dismiss pull request reviews that are no longer valid or are unable to be approved by the reviewer.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review
|
||||
- /articles/dismissing-a-pull-request-review
|
||||
- /github/collaborating-with-issues-and-pull-requests/dismissing-a-pull-request-review
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Dismiss a PR review
|
||||
---
|
||||
{% data reusables.pull_requests.dismiss_review %}
|
||||
This changes the status of the review to a review comment. When you dismiss a review, you must add a comment explaining why you dismissed it. Your comment will be added to the pull request conversation.
|
||||
|
||||
{% data reusables.search.requested_reviews_search %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
{% data reusables.repositories.choose-pr-review %}
|
||||
3. On the "Conversation" tab, scroll to the review you'd like to dismiss, then click {% octicon "chevron-down" aria-label="The down button" %}. 
|
||||
4. Click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then click **Dismiss review**.
|
||||

|
||||
5. Type your reason for dismissing the review, then click **Dismiss review**.
|
||||

|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About pull request reviews](/articles/about-pull-request-reviews)"
|
||||
- "[Reviewing proposed changes in a pull request](/articles/reviewing-proposed-changes-in-a-pull-request)"
|
||||
- "[About protected branches](/github/administering-a-repository/about-protected-branches#require-pull-request-reviews-before-merging)"
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
title: Filtering files in a pull request
|
||||
intro: 'To help you quickly review changes in a large pull request, you can filter changed files.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request
|
||||
- /articles/filtering-files-in-a-pull-request-by-file-type/
|
||||
- /articles/filtering-files-in-a-pull-request
|
||||
- /github/collaborating-with-issues-and-pull-requests/filtering-files-in-a-pull-request
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pull requests
|
||||
shortTitle: Filter files
|
||||
---
|
||||
You can filter files in a pull request by file extension type, such as `.html` or `.js`, lack of an extension, code ownership, or dotfiles.
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** To simplify your pull request diff view, you can also temporarily hide deleted files or files you have already viewed in the pull request diff from the file filter drop-down menu.
|
||||
|
||||
{% endtip %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
2. In the list of pull requests, click the pull request you'd like to filter.
|
||||
{% data reusables.repositories.changed-files %}
|
||||
4. Use the File filter drop-down menu, and select, unselect, or click the desired filters.
|
||||

|
||||
5. Optionally, to clear the filter selection, under the **Files changed** tab, click **Clear**.
|
||||

|
||||
|
||||
## Further reading
|
||||
|
||||
- "[About comparing branches in a pull request](/articles/about-comparing-branches-in-pull-requests)"
|
||||
- "[Finding changed methods and functions in a pull request](/articles/finding-changed-methods-and-functions-in-a-pull-request)"
|
||||