Rebase should do it.
git rebase -p --onto master testing~10 testing
This will copy the last ten commits on testing to master and make that the new testing (the old testing will be an orphan). Then you can merge master to testing as a fast-forward.
git checkout master
git merge testing
Related Contents:
- Git number of commits per author on all branches
- Updates were rejected because the remote contains work that you do not have locally
- How to find commits by a specific user in Git? [duplicate]
- Error “Updates were rejected because the remote contains work that you do not have locally”
- git commit frequency
- How do I delete a Git branch locally and remotely?
- How do I discard unstaged changes in Git?
- How do I reset or revert a file to a specific revision?
- How do I change the author and committer name/email for multiple commits?
- Ignore files that have already been committed to a Git repository [duplicate]
- Undo working copy modifications of one file in Git?
- Get changes from master into branch in Git
- Download single files from GitHub
- Git: How to squash all commits on branch
- Should composer.lock be committed to version control?
- How to unstage large number of files without deleting the content
- Managing large binary files with Git
- Start a Git commit message with a hashmark (#)
- GitHub pull request showing commits that are already in target branch
- Git – How to close commit editor?
- Git diff between current branch and master but not including unmerged master commits
- How can I create a Git repository with the default branch name other than “master”?
- Ignoring an already checked-in directory’s contents?
- Git: How to rebase to a specific commit?
- What is a tracking branch?
- How do I do an initial push to a remote repository with Git?
- Editing the git commit message in GitHub
- How to commit no change and new message?
- Git undo changes in some files [duplicate]
- Revert changes to a file in a commit
- Why is “origin/HEAD” shown when running “git branch -r”?
- Maintain git repo inside another git repo
- Git push: “fatal ‘origin’ does not appear to be a git repository – fatal Could not read from remote repository.”
- Git cherry pick vs rebase
- Git: How to reuse/retain commit messages after ‘git reset’?
- Difference between GIT and CVS
- How do you commit code as a different user?
- How to perform better document version control on Excel files and SQL schema files
- Filter git log to show only my changes
- Is there a Github clone in PHP that I can run on my own server? [closed]
- How to Conclude a Git Cherry-Pick?
- Is it possible to alias a branch in Git?
- Switching branches without touching the working tree?
- How do you undo “Discard all changes” in VS Code/Git
- Git: How to make outer repository and embedded repository work as common/standalone repository?
- GitHub: How to do case sensitive search for the code in repository?
- How to create a new branch on both local and remote? GIT [duplicate]
- How secure would github hosting be for private repositories? [closed]
- git pull all branches from remote repository
- git: merge branch and use meaningful merge commit message?