[June 16, 2021] GitHub Desktop 2.9 updates (#19781)
|
@ -102,7 +102,7 @@ jobs:
|
|||
|
||||
const badFiles = badFilesArr.join('\n')
|
||||
|
||||
let reviewMessage = `👋 Hey there spelunker. It looks like you've modified some files that we can't accept as contributions. The complete list of files we can't accept are:\n${badFiles}\n\nYou'll need to revert all of the files you changed in that list using [GitHub Desktop](https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/reverting-a-commit) or \`git checkout origin/main <file name>\`. Once you get those files reverted, we can continue with the review process. :octocat:`
|
||||
let reviewMessage = `👋 Hey there spelunker. It looks like you've modified some files that we can't accept as contributions. The complete list of files we can't accept are:\n${badFiles}\n\nYou'll need to revert all of the files you changed in that list using [GitHub Desktop](https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/managing-commits/reverting-a-commit) or \`git checkout origin/main <file name>\`. Once you get those files reverted, we can continue with the review process. :octocat:`
|
||||
|
||||
await github.pulls.createReview({
|
||||
...context.repo,
|
||||
|
|
После Ширина: | Высота: | Размер: 224 KiB |
После Ширина: | Высота: | Размер: 210 KiB |
После Ширина: | Высота: | Размер: 130 KiB |
После Ширина: | Высота: | Размер: 58 KiB |
После Ширина: | Высота: | Размер: 364 KiB |
После Ширина: | Высота: | Размер: 92 KiB |
После Ширина: | Высота: | Размер: 48 KiB |
После Ширина: | Высота: | Размер: 85 KiB |
После Ширина: | Высота: | Размер: 65 KiB |
После Ширина: | Высота: | Размер: 205 KiB |
После Ширина: | Высота: | Размер: 71 KiB |
После Ширина: | Высота: | Размер: 200 KiB |
После Ширина: | Высота: | Размер: 93 KiB |
После Ширина: | Высота: | Размер: 49 KiB |
После Ширина: | Высота: | Размер: 136 KiB |
После Ширина: | Высота: | Размер: 66 KiB |
|
@ -9,6 +9,7 @@ versions:
|
|||
children:
|
||||
- /adding-and-cloning-repositories
|
||||
- /making-changes-in-a-branch
|
||||
- /managing-commits
|
||||
- /working-with-your-remote-repository-on-github-or-github-enterprise
|
||||
- /keeping-your-local-repository-in-sync-with-github
|
||||
---
|
||||
|
|
|
@ -71,6 +71,19 @@ Some workflows require or benefit from rebasing instead of merging. By rebasing
|
|||
|
||||
{% endwindows %}
|
||||
|
||||
## Squashing and merging another branch into your project branch
|
||||
|
||||
1. Use the **Branch** drop-down and click **Squash and Merge into Current Branch**.
|
||||
![Squash and merge in branch dropdown](/assets/images/help/desktop/squash-and-merge-menu.png)
|
||||
2. Click the branch you want to merge into the current branch, then click **Squash and merge**.
|
||||
![Squash and merge button](/assets/images/help/desktop/squash-and-merge-selection.png)
|
||||
{% note %}
|
||||
|
||||
**Note:** If there are merge conflicts, {% data variables.product.prodname_desktop %} will warn you above the **Squash and merge** button. You will not be able to squash and merge the branch until you have resolved all conflicts.
|
||||
|
||||
{% endnote %}
|
||||
{% data reusables.desktop.push-origin %}
|
||||
|
||||
## Further Reading
|
||||
- "[Pull](/github/getting-started-with-github/github-glossary#pull)" in the {% data variables.product.prodname_dotcom %} glossary
|
||||
- "[Merge](/github/getting-started-with-github/github-glossary#merge)" in the {% data variables.product.prodname_dotcom %} glossary
|
||||
|
|
|
@ -100,14 +100,14 @@ Once you're satisfied with the changes you've chosen to include in your commit,
|
|||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.desktop.tags-push-with-commits %} For more information, see "[Managing tags](/desktop/contributing-to-projects/managing-tags)."
|
||||
**Note**: {% data reusables.desktop.tags-push-with-commits %} For more information, see "[Managing tags](/desktop/contributing-and-collaborating-using-github-desktop/managing-commits/managing-tags)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.desktop.commit-message %}
|
||||
|
||||
![Commit message field](/assets/images/help/desktop/commit-message.png)
|
||||
2. Optionally, to attribute a commit to another author, click the add co-authors icon and type the username(s) you want to include.
|
||||
1. Optionally, to attribute a commit to another author, click the add co-authors icon and type the username(s) you want to include.
|
||||
|
||||
![Add a co-author to the commit message](/assets/images/help/desktop/add-co-author-commit.png)
|
||||
{% data reusables.desktop.commit-button %}
|
||||
|
|
|
@ -9,10 +9,7 @@ children:
|
|||
- /managing-branches
|
||||
- /committing-and-reviewing-changes-to-your-project
|
||||
- /stashing-changes
|
||||
- /pushing-changes-to-github
|
||||
- /reverting-a-commit
|
||||
- /cherry-picking-a-commit
|
||||
- /managing-tags
|
||||
- /viewing-the-branch-history
|
||||
- /pushing-changes-to-github
|
||||
---
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ You can use branches to safely experiment with changes to your project. Branches
|
|||
|
||||
You always create a branch from an existing branch. Typically, you might create a 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.
|
||||
|
||||
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)."
|
||||
|
||||
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.
|
||||
|
@ -58,6 +60,15 @@ You can always create a branch in {% data variables.product.prodname_desktop %}
|
|||
|
||||
{% endwindows %}
|
||||
|
||||
## Creating a branch from a previous commit
|
||||
|
||||
{% data reusables.desktop.history-tab %}
|
||||
2. Right-click on the commit you would like to create a new branch from and select **Create Branch from Commit**.
|
||||
![Create branch from commit context menu](/assets/images/help/desktop/create-branch-from-commit-context-menu.png)
|
||||
{% data reusables.desktop.name-branch %}
|
||||
{% data reusables.desktop.confirm-new-branch-button %}
|
||||
![Create branch from commit](/assets/images/help/desktop/create-branch-from-commit-overview.png)
|
||||
|
||||
## Publishing a branch
|
||||
|
||||
If you create a branch on {% data variables.product.product_name %}, you'll need to publish the branch to make it available for collaboration on {% data variables.product.prodname_dotcom %}.
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: Amending a commit
|
||||
intro: 'You can use {% data variables.product.prodname_desktop %} to amend your last commit.'
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
---
|
||||
|
||||
## About amending a commit
|
||||
|
||||
Amending a commit is a way to modify the most recent commit you have made in your current branch. This can be helpful if you need to edit the commit message or if you forgot to include changes in the commit.
|
||||
|
||||
You can continue to amend a commit until you push it to the remote repository. After you push a commit, the option to amend it is disabled in {% data variables.product.prodname_desktop %}. When you amend a commit, you replace the previous commit with a new commit to your current branch. Amending a commit that has been pushed to the remote repository could cause confusion for other collaborators working with the repository.
|
||||
|
||||
## Amending a commit
|
||||
|
||||
{% data reusables.desktop.history-tab %}
|
||||
2. Right-click on the most recent commit and select **Amend commit**.
|
||||
![Amend commit context menu](/assets/images/help/desktop/amend-commit-context-menu.png)
|
||||
3. Click the **Summary** field to modify the commit message. Optionally, you can modify or add information about the commit in the **Description** field.
|
||||
4. Select any uncommitted changes that you would like to add to the commit. For more information about selecting changes, see "[Committing and reviewing changes to your project](/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project#selecting-changes-to-include-in-a-commit)."
|
||||
5. Once you have finalized your changes, click **Amend last commit**.
|
||||
![Amend last commit overview](/assets/images/help/desktop/amend-last-commit-overview.png)
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: Managing commits
|
||||
intro: 'You can use {% data variables.product.prodname_desktop %} to amend, cherry-pick, reorder, revert, and squash commits.'
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
children:
|
||||
- /reverting-a-commit
|
||||
- /cherry-picking-a-commit
|
||||
- /reordering-commits
|
||||
- /squashing-commits
|
||||
- /amending-a-commit
|
||||
- /managing-tags
|
||||
---
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
title: Reordering commits
|
||||
intro: "You can use {% data variables.product.prodname_desktop %} to reorder commits in your branch's history."
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
---
|
||||
|
||||
## About reordering a commit
|
||||
|
||||
Reordering allows you to alter your commit history to provide a more meaningful progression of commits. {% data variables.product.prodname_desktop %} allows you to drag-and-drop commits in your branch's history to reorder them.
|
||||
|
||||
## Reordering a commit
|
||||
|
||||
{% data reusables.desktop.current-branch-menu %}
|
||||
2. In the list of branches, click the branch with the commits that you want to reorder.
|
||||
{% data reusables.desktop.history-tab %}
|
||||
4. Drag the commit that you want to reorder and drop it between two adjoining commits.
|
||||
![reorder drag and drop](/assets/images/help/desktop/reorder-drag-and-drop.png)
|
||||
While the application reorders the commits, a **Reorder in process** dialog indicates the progress of the change.
|
||||
|
||||
## Error messages when reordering commits
|
||||
|
||||
When you reorder commits, you may see one of the following notifications or error messages.
|
||||
|
||||
* A notification states that the requested change to the branch will require a force push to update the remote branch. This is shown when the commits that you reordered were previously pushed to the remote branch. Force pushing alters the commit history of the branch and will affect other collaborators who are working in that branch. Select **Begin reorder** to start the reorder, and then click **Force push origin** to push your changes.
|
||||
|
||||
![reorder force push dialog](/assets/images/help/desktop/reorder-force-push-dialog.png)
|
||||
|
||||
* An error states that the reorder failed because there is a merge commit among the reordered commits.
|
||||
|
||||
![reorder merge commit dialog](/assets/images/help/desktop/reorder-merge-commit-dialog.png)
|
||||
|
||||
* A notification is shown indicating that there are uncommitted changes present on your current branch. Select **Stash Changes and Continue** to store the changes and proceed, or select **Close** to dismiss the message and commit the changes. When there are no longer any uncommitted changes, you can reorder your commits.
|
||||
|
||||
![reorder stash dialog](/assets/images/help/desktop/reorder-stash-dialog.png)
|
||||
|
||||
* A message states that there are merge conflicts that you must resolve before the application can continue reordering commits on your branch.
|
||||
1. Click **View conflicts** to see the conflicts.
|
||||
{% data reusables.desktop.resolve-merge-conflicts %}
|
||||
|
||||
![reorder resolve conflicts message](/assets/images/help/desktop/reorder-resolve-conflicts.png)
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
title: Squashing commits
|
||||
intro: "You can use {% data variables.product.prodname_desktop %} to squash commits in your branch's history."
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
---
|
||||
|
||||
## About squashing a commit
|
||||
|
||||
Squashing allows you to combine multiple commits in your branch's history into a single commit. This can help keep your repository's history more readable and understandable.
|
||||
|
||||
## Squashing a commit
|
||||
|
||||
{% mac %}
|
||||
|
||||
{% data reusables.desktop.current-branch-menu %}
|
||||
2. In the list of branches, select the branch that has the commits that you want to squash.
|
||||
{% data reusables.desktop.history-tab %}
|
||||
4. Select the commits to squash and drop them on the commit you want to combine them with. You can select one commit or select multiple commits using <kbd>⌘</kbd> or <kbd>Shift</kbd>.
|
||||
![squash drag and drop](/assets/images/help/desktop/squash-drag-and-drop.png)
|
||||
5. Modify the commit message of your new commit. The commit messages of the selected commits you want to squash are pre-filled into the **Summary** and **Description** fields.
|
||||
6. Click **Squash Commmits**.
|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||
{% data reusables.desktop.current-branch-menu %}
|
||||
2. In the list of branches, select the branch that has the commits that you want to squash.
|
||||
{% data reusables.desktop.history-tab %}
|
||||
4. Select the commits to squash and drop them on the commit you want to combine them with. You can select one commit or select multiple commits using <kbd>Ctrl</kbd> or <kbd>Shift</kbd>.
|
||||
![squash drag and drop](/assets/images/help/desktop/squash-drag-and-drop.png)
|
||||
5. Modify the commit message of your new commit. The commit messages of the selected commits you want to squash are pre-filled into the **Summary** and **Description** fields.
|
||||
6. Click **Squash Commmits**.
|
||||
|
||||
{% endwindows %}
|
||||
|
||||
## Error messages when squashing commits
|
||||
|
||||
When you squash commits, you may see one of the following notifications or error messages.
|
||||
|
||||
* A notification states that the requested change to the branch will require a force push to update the remote branch. Force pushing alters the commit history of the branch and will affect other collaborators who are working in that branch. Select **Begin Squash** to start the squash, and then click **Force push origin** to push your changes.
|
||||
|
||||
![squash force push dialog](/assets/images/help/desktop/squash-force-push.png)
|
||||
|
||||
* An error states that the squash failed because there is a merge commit among the squashed commits.
|
||||
|
||||
![reorder merge commit dialog](/assets/images/help/desktop/squash-merge-commit-dialog.png)
|
||||
|
||||
* A notification is shown indicating that there are uncommitted changes present on your current branch. Select **Stash Changes and Continue** to store the changes and proceed, or select **Close** to dismiss the message and commit the changes. When there are no longer any uncommitted changes you can squash your commits.
|
||||
|
||||
![squash stash dialog](/assets/images/help/desktop/squash-stash-dialog.png)
|