This information is for Scilab developers and code contributors. See GIT for a table of content. If you are a user of Scilab, you probably don't need to look at this.
My Way to apply a "master" commit to the "5.1" branch
This information is for Scilab developers and code contributors. See GIT for a table of content. If you are a user of Scilab, you probably don't need to look at this.
Note: Use this method only if you have forgotten to commit into the 5.1 first ! |
Contents
Get the repositories
[SHELL] mkdir ~/repositories [SHELL] cd ~/repositories # master branch # ======================================================= [SHELL] git clone git@git.scilab.org:scilab [SHELL] mv scilab master # 5.1 branch # ======================================================= [SHELL] git clone git@git.scilab.org:scilab [SHELL] mv scilab 5.1 [SHELL] cd 5.1 # Create a local 5.1 branch [SHELL] git branch 5.1 refs/remotes/origin/5.1 # CheckOut this branch [SHELL] git checkout 5.1 # We don't need the master branch in this repository anymore : [SHELL] git branch -D master
Apply a "master" commit to the "5.1" branch
[SHELL] cd ~/repositories/5.1 # Just check the branch [SHELL] git branch # Apply the commit [SHELL] git cherry-pick <COMMIT NUMBER> # Resolve conflicts if needed [SHELL] nano <FILES IN CONLICT> [SHELL] git add <FILES IN CONLICT> # Commit it [SHELL] git commit # Send the commit to the server [SHELL] git push # Now merge the 5.1 branch with master branch [SHELL] cd ~/repositories/master # Update your "master" repository [SHELL] git pull # And now, The Merge [SHELL] git merge refs/remotes/origin/5.1 # Check the commits [SHELL] git log -n 4 # Send the commit to the server [SHELL] git push