GIT step by step
First step : get your own repository
1 [$SHELL] git clone git://git.scilab.org/scilab
It is a good idea to introduce yourself to git with your name and public email address before doing any operation. The easiest way to do so is:
1 [$SHELL] git config --global user.name "Your Name Comes Here"
2 [$SHELL] git config --global user.email you@yourdomain.example.com
Switch to a branch
1 [$SHELL] git branch 5.0 refs/remotes/origin/5.0
2 [$SHELL] git checkout 5.0
Merge the master branch into scipad branch for example
1 [$SHELL] git checkout master
2 [$SHELL] git pull
3 [$SHELL] git branch scipad refs/remotes/origin/scipad
4 [$SHELL] git checkout scipad
5 [$SHELL] git merge master
6 [$SHELL] git push
Switch modifications from a branch to an other branch without commit or diff
1 [$SHELL] edit your suff
2 [$SHELL] git stash
3 Saved working directory and index state ...
4 [...]
5 [$SHELL] git checkout 5.0
6 [$SHELL] git stash apply
Apply a specific modification against an other branch.
1 [$SHELL] git checkout 5.0
2 [$SHELL] git cherry-pick 2dbe5502787ae9f52faf400ab54aea0be6a43507
How can I ask git to give me the diff between a file in master and one in 5.1
1 [$SHELL] git diff refs/remotes/origin/master..refs/remotes/origin/5.1 scilab/Version.incl
2 . diff --git a/scilab/Version.incl b/scilab/Version.incl
3 . index 80e8b92..5aae442 100644
4 . --- a/scilab/Version.incl
5 . +++ b/scilab/Version.incl
6 . @@ -1 +1 @@
7 . -SCIVERSION=Scilab-master-GIT
8 . +SCIVERSION=Scilab-Branch-5.1-GIT
