-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Submit a pull request
If you have made changes to the code that you want to share with us then you need to create a pull request (PR) on GitHub.
Firstly, you must have followed all the steps in Get MuseScore's source code so that you have a fork of the repository on GitHub and a local copy on your machine. Naturally, you should also have compiled and edited the code.
Changes should not be made on the master
branch, so create a new one with an appropriate name relating to the change (e.g. play-panel
, note-input
, transposition
, etc.).
git checkout -b branch-name
git push origin branch-name
Use the "Compare & Pull Request" button on your forked repository page.
You can update an existing PR by pushing to the same branch on GitHub. Please do this instead of creating a new PR.
git push origin branch-name # normal push
git push -f origin branch-name # force push
You might have to "force push" (use -f
option to git push
) if you changed an existing commit rather than just adding new commits.
git pull --rebase upstream master
If you are rebasing to run the CI tests again, follow this with a force push
You might have numerous commits on your Pull Request (or your branch). To quite literally squash those commits into a single one:
git rebase -i HEAD~3 # perform an interactive rebase on last 3 commits
This results in a new interface showing the last 3 commits on your branch. Each commit is preceded by pick
:
pick 5ce6edc274 first_commit
pick 195db66b9a second_commit
pick 1912836a12 third_commit
This interface is actually a text editor (usually vi or nano) running inside your terminal. You need to edit the file to tell Git what you want to do with each commit. The options include pick
, squash
, edit
and drop
, and their meanings are explained in comments further down the text file. You can even rearrange commits in the editor to change their order in the history.
When you replace pick
in the second line with squash
, you are going to squash the second commit onto the first. So if you want to squash the second and third commit onto the first, replace the pick
with squash
in the second and third lines.
- If you're editing in nano then you can replace the text right away just by typing.
- If you're in vi you'll need to press I to get into insert mode before you can replace the text.
Once this is completed, you need to save the file and close the editor.
- In nano, press
^O
(Ctrl+O) to output the file, followed by Enter to use the default filename, then^X
(Ctrl+X) to exit nano. - In vi, press Esc (Escape) to leave insert mode (i.e. return to command mode), then type
:wq
to write the file and quit the editor.
Since you chose to squash
some commits (i.e. replace them with one big commit), another text file will open for you to type a commit message for the new commit. Type the message and delete (or comment out) any lines that you don't want to keep from the default message, then save the file and quit the editor as before. Use git status
to check that the rebase was complete, followed by git log
and git show
to check that it did what you wanted.
If you already have a PR open with the unsquashed commits, you need to force push to update it with the squashed one:
git push -f origin branch-name
If you want to squash your last X commits into one commit using Git, first rollback all the changes made in the last X commits. All changes will be automatically staged by Git.
git reset --soft HEAD~{NUMBER_OF_COMMITS}
Then commit all the changes together.
git commit -m "{COMMIT_TITLE}"
If you have a PR open with multiple commits to be squashed, you also have to force push.
git push -f origin branch-name
Testing
- Manual testing
- Automatic testing
Translation
Compilation
- Set up developer environment
- Install Qt and Qt Creator
- Get MuseScore's source code
- Install dependencies
- Compile on the command line
- Compile in Qt Creator
Beyond compiling
Misc. development
Architecture general
- Architecture overview
- AppShell
- Modularity
- Interact workflow
- Channels and Notifications
- Settings and Configuration
- Error handling
- Launcher and Interactive
- Keyboard Navigation
Audio
Engraving
- Style settings
- Working with style files
- Style parameter changes for 4.0
- Style parameter changes for 4.1
- Style parameter changes for 4.2
- Style parameter changes for 4.3
- Style parameter changes for 4.4
Extensions
- Extensions overview
- Manifest
- Forms
- Macros
- Api
- Legacy plugin API
Google Summer of Code
References