Open main menu

Changes

Git asynchronous development

126 bytes added, 09:42, 16 October 2020
m
Switch to the {{relax developer link}} template to remove dead Gna! links.
{{historical svn}}
{{caution|This article is out of date, please see the [[Git_svn|article on using git-svn]] for a more appropriate development strategy.}}
 
== Motivation ==
Subversion needs an online repository, to store each commits. Subsequent calls to '''svn diff > patch''' will generate the difference according to the last revision. Therefore the development at the moment, require to
== Initialization of git ==
Navigate to the root folder of the branch of relax, you want to develop. Initialize with: git initThen follow the this post [[Git_svn#relax_branches_at_github | relax_branches_at_github]]
=== Setup commit information ===
git br -a
Then we add the files git add lib/software/nmrpipe.py git commit commit message<source lang="text">Added nmrpipe into git</source>  # To see the commit message git log # Or see last changes by git log -p Then we create the '''seriestabnmrpipe''' branch(because we edit nmrpipe.py), from where we will create the patch according to the differences of the '''sr''' branch. git co -b seriestab nmrpipe sr
=== Checking out a development branch ===
git log -p
Now create your [[Git_patch | git patch]], comparing to the sr branch git format-patch sr--stdout > nmrpipe.patch
=== Modification 2 ===
Now create your patches, comparing to the sr branch
git format-patch sr--stdout > nmrpipe2.patchThis should provide two you with a second patch files, with more commits.
=== Getting an overview ===
Now create your patch, comparing to the sr branch
git format-patch sr--stdout > nmrpipe3.patch
=== Continuation ===
=== Upload patches ===
First delete all the previous made patches.
rm -r 000*.patch
Now create your patches, comparing to the sr branch
git format-patch sr--stdout > nmrpipe.patch
Then upload a zip file with all the patches [[git_patch|git patch]] to the [https://gna.org/support/?group=relax support tracker].
== Reviewing suggestions and modify commit ==
There were a number of [http://article.gmane.org/gmane.science.nmr.relax.devel/4120 suggestions] to the patchesfrom {{relax developer link|username=bugman|text=Edward}}.
=== Squash commits ===
relax -s Peak_lists.test_read_peak_list_NMRPipe_seriesTab
=== Changes to pipe_control\.spectrum.py\read() ===The above test, showed that the reading function had to be adjusted. So now we create a new branch, which is based on the branch we last edited. git co -b sr2 seriestab git add pipe_control\spectrum.py git commit -m "Added pipe_control\spectrumMeaning we copy the content of the modified files.py into git" git co -b spectrum sr2nmrpipe git diff --stat --color sr2nmrpipe..spectrum
The last line, should show an empty line for "no changes".
=== Finishing up ===
Delete old patches
rm 000*.patch
First change to the first branch we made changes is
git co seriestabnmrpipe git format-patch sr tar -zcvf seriestab.tar.gz *-stdout > nmrpipe.patch rm 000*.patch 
git co spectrum
git format-patch sr2 tar nmrpipe -zcvf -stdout > spectrum.tar.gz *.patch rm 000*.patch
== See also ==
Trusted, Bureaucrats
4,228

edits