Advertisement
Guest User

Rockbox git branch

a guest
Nov 27th, 2018
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. Making changes to your copy of the Rockbox Source:
  2.  
  3. So now you have a copy of the Rockbox source on your machine
  4. I bet you are ready to add some patches and tweaks to really make it yours!
  5.  
  6. We're almost there but first lets make a new branch.
  7. Whats is a branch it is a way to set a point in history that you can go back to.
  8.  
  9. At the moment your source tree is at master you can verify this by typing 'git branch'
  10.  
  11. instead of making changes to this master branch go ahead and create a sub branch for some testing
  12. 'git checkout -b myreallyawesomebranch'
  13.  
  14. Now master has been cloned to myreallyawesomebranch you can make your changes while still having
  15. an original copy of master still waiting for you.
  16.  
  17. Once you have made your changes type 'git status' to see a list of the files you have changed
  18. lets commit this to your local machine and checkout a new branch
  19.  
  20. When you type git add <filename> it stages the file for commit you need to do this for each of
  21. the modified files you see in the git status list.
  22.  
  23. finally when you have all changes added type 'git commit'
  24.  
  25. type a message (blank messages will abort the commit)
  26.  
  27. Finally press '[CTRL]o' and then '[CTRL]x'
  28.  
  29. Yay you just made your first commit!!
  30.  
  31. Now type git checkout master and you are back at the Rockbox original source
  32.  
  33. It's a good idea to update your copy of the source tree every once in a while.
  34. at the master branch type 'git pull --rebase'
  35.  
  36. Now lets checkout a new branch 'git checkout -b newtestbranch'
  37. now you are on a new freshly updated branch where you can make more changes
  38.  
  39. But wait you say I just ran rebase on master does it update 'myreallyawesomebranch' too?
  40.  
  41. No for that you need to go to the branch and rebase it as well
  42.  
  43. Assuming you haven't made changes to newtestbranch (otherwise you'll need to commit the changes first)
  44. you can just type 'git checkout myreallyawesomebranch' and now type 'git rebase master' and now if at
  45. all possible git will update 'myreallyawesomebranch' to the same place as master with your changes applied on top
  46.  
  47. (Note: git can't always figure out how to update to the latest master so it needs to be done by hand with little
  48. guidance from git or just abort the rebase).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement