User Tools

Site Tools


using_git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
using_git [2018/09/10 00:00]
be.ing [Using Git for Mixxx Testing and Development]
using_git [2020/01/19 17:28]
hlzhs [Targeting another base branch]
Line 65: Line 65:
 If you want your changes included in a current beta release or a bugfix point release (such as 2.1.1), start your new branch from the release branch instead of the master branch, for example: If you want your changes included in a current beta release or a bugfix point release (such as 2.1.1), start your new branch from the release branch instead of the master branch, for example:
 <​code>​ <​code>​
-git checkout -b fixing_some_bug upstream/2.1+git checkout -b fixing_some_bug upstream/2.2
 </​code>​ </​code>​
  
Line 116: Line 116:
  
 To work on another bug or feature, [[#create a new branch]]. To work on another bug or feature, [[#create a new branch]].
 +
 +====== Targeting another base branch ======
 +Sometimes you [[#​create_a_new_branch|started your work]] from the wrong base branch. Maybe you wrote a bugfix or a controller mapping that should be merged into current stable release, but started from the ''​master''​ branch instead of the stable version'​s branch.
 +
 +In these cases you need to [[https://​git-scm.com/​book/​en/​Git-Branching-Rebasing|rebase]] your work on the correct branch. For example, the current stable version is 2.2.3 and you want your changes to be a part of the 2.2.4 release, but you based your work on ''​master'',​ you need to rebase onto the ''​2.2''​ branch.
 +
 +To rebase your work in the ''​fixing_some_bug''​ branch from ''​master''​ onto ''​2.2'',​ run:
 +<​code>​
 +git fetch upstream
 +git rebase --onto upstream/​2.2 upstream/​master fixing_some_bug
 +</​code>​
 +
 +Since this changes commits that you already pushed to the server, you need to use the ''​-f''​ flag when pushing the changes to the remote repository:
 +<​code>​
 +git push -f origin fixing_some_bug
 +</​code>​
 +
 +
 +If you already opened a PR, you need to [[https://​help.github.com/​en/​github/​collaborating-with-issues-and-pull-requests/​changing-the-base-branch-of-a-pull-request|change its base branch]]. ​
 +
  
 ====== Keeping up to date with upstream ====== ====== Keeping up to date with upstream ======
Line 143: Line 163:
 All of these tutorials are interactive and guide you with helpful graphics. Don't worry if you don't understand everything the first time. All of these tutorials are interactive and guide you with helpful graphics. Don't worry if you don't understand everything the first time.
  
-{{https://imgs.xkcd.com/comics/git.png}}+{{:​git-xkcd.png}} 
 + 
 +Image from [[https://​xkcd.com/​1597/|xkcd]]
  
 ====== Working on mappings and skins separately from other changes ====== ====== Working on mappings and skins separately from other changes ======
using_git.txt · Last modified: 2020/03/25 11:30 by be.ing