Add Command Line Instructions Link for Merging Pull Requests #4005

Closed
opened 2025-11-02 05:33:48 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @bagasme on GitHub (Sep 24, 2019).

  • Gitea version (or commit ref): 1.9.0
  • Git version: 2.17.1
  • Operating system: Ubuntu 18.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    (not relevant)

Description

In some cases when automatic merge PR cannot be done or whether merge button isn't desired, manual merging via command line can be performed instead.

Here are steps to perform manual merging (steps quoted from GitHub):

  1. From your project's repository, fetch the changes from a PR, merge from master, and test:
git fetch origin
git checkout -b someone-patch-1-pr origin/someone-patch-1-pr
git merge master
  1. Merge the changes back to master (--no-ff) and push:
git checkout master
git merge --no-ff someone-patch-1-pr
git push origin master

Screenshots

This screenshot is from my localhost Gitea instance. Note that there isn't view command line instructions link beside merge button:
image

Merge PR button on GitHub contains view command line instructions link. When the link is clicked, it opened full instructions, similar to the description above:
image

Originally created by @bagasme on GitHub (Sep 24, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.9.0 - Git version: 2.17.1 - Operating system: Ubuntu 18.04 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: (not relevant) ## Description In some cases when automatic merge PR cannot be done or whether merge button isn't desired, manual merging via command line can be performed instead. Here are steps to perform manual merging (steps quoted from GitHub): 1. From your project's repository, fetch the changes from a PR, merge from `master`, and test: ``` git fetch origin git checkout -b someone-patch-1-pr origin/someone-patch-1-pr git merge master ``` 2. Merge the changes back to `master` (`--no-ff`) and push: ``` git checkout master git merge --no-ff someone-patch-1-pr git push origin master ``` ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> This screenshot is from my `localhost` Gitea instance. Note that there isn't `view command line instructions` link beside merge button: ![image](https://user-images.githubusercontent.com/40219486/65478452-fa380b80-deb3-11e9-8ef4-1fc9f202d551.png) Merge PR button on GitHub contains `view command line instructions` link. When the link is clicked, it opened full instructions, similar to the description above: ![image](https://user-images.githubusercontent.com/40219486/65478582-77638080-deb4-11e9-9497-f33ba979a2c8.png)
GiteaMirror added the issue/confirmedtype/enhancement labels 2025-11-02 05:33:48 -06:00
Author
Owner

@bagasme commented on GitHub (Sep 24, 2019):

The merging instructions above is similar to when hitting Merge Pull Request button regardless of merging method chosen in the button.

@bagasme commented on GitHub (Sep 24, 2019): The merging instructions above is similar to when hitting `Merge Pull Request` button regardless of merging method chosen in the button.
Author
Owner

@markusamshove commented on GitHub (Sep 26, 2019):

This needs to take into consideration if the user is allowed to push into the target branch if it is protected

@markusamshove commented on GitHub (Sep 26, 2019): This needs to take into consideration if the user is allowed to push into the target branch if it is protected
Author
Owner

@stale[bot] commented on GitHub (Nov 25, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Nov 25, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@na-Itms commented on GitHub (Apr 14, 2024):

This seems to have been addressed as part of a9cc9c0, then improved in 2c04595 and 7a286e4. This issue now looks like it could be closed.

@na-Itms commented on GitHub (Apr 14, 2024): This seems to have been addressed as part of a9cc9c0, then improved in 2c04595 and 7a286e4. This issue now looks like it could be closed.
Author
Owner

@delvh commented on GitHub (Apr 14, 2024):

As per @na-Itms

@delvh commented on GitHub (Apr 14, 2024): As per @na-Itms
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4005