MoinMoin, Sshfs, Git
Contents
MoinMoin lets you publish Easy-To-Read web pages and fosters Collaboration
Try it Now - WikiSandBox
- Don't hesitate and write something - it's just a sand box.
- To Export pages as PDF
Click on More Actions
Click on Print View
- Use your browser to "Print" into a PDF or a PS file
The .ps file can be later converted to PDF with the ps2pdf command, which is part of Debian's gs-common package
Sshfs lets you control When and Where your files are mounted
Important improvements are on their way
Re: Deploying SSHFS on workstations instead of NFS- Mount
mkdir bio sshfs biocluster: bio
- Un-mount
fusermount -u bio rmdir bio
- My first Debian 4.0 tested Beta version of a ...
Script that mounts Biocluster when you open your first terminal - Source Code
Script that un-mounts Biocluster when you close your last terminal - Source Code
Bashrc portion that invokes the two scripts - Source Code
Git is More Intuitive, Faster, and more Reliable than CVS and Subversion
I. Starting a Version Controlled Project
- Log-in with X11 forwarding enabled
ssh -Y biocluster
- Start your project
I create a simple .tree file that can be visualized here http://bioinfo.ucr.edu/projects/TreeBrowse/
mkdir best-project-of-the-year cd !$ echo "#A very small tree" > small.tree echo "((A:0.35574,B:0.46298):0.218);" >> small.tree echo "" >> small.tree
- Create an empty Git repository
The complete repository will be stored in the .git directory.
git init ls -a # Can you see the .git directory?
Individually select the files that will be part of the Original Commit to the repository
git add small.tree
Perform the Original Commit
When you run this command a text editor will open. Write some simple comment, save, and exit.
git commit
- Now, let us make this commit a branch named "original"
- Note: Even though this will create a new branch, we will continue the development on the "master" branch
git branch original
- Note: Even though this will create a new branch, we will continue the development on the "master" branch
- So the original small.tree looks like this
II. Adding some data
Add some lines to small.tree
echo "# Annotations" >> small.tree echo -e "A\t\tred\t\thttp://" >> small.tree echo -e "B\t\tred\t\thttp://" >> small.tree
- Add and commit the new changes
git add small.tree ; git commit
- Repeat if you need to add more changes
- Now the commited small.tree looks like this
III. Making a branch and Stepping Back
- List all branches
The current branch is marked with an asterisk (*)
git branch
- Save your current work into a separate branch
git branch red
- Open the graphical Git repository browser
The --all argument enables visualizing all existing branches
gitk --all&
- You will see something like this
Step back to the Original Commit
Instead of the branch name "original" you put the SHA1 IDs that you can get from the graphical repository browser
git reset --hard original
- Now, gitk will show something like this
In graphical Git repository browser, click File->Update or press F5
IV. Changing some data
Open small.tree in a text editor
vi small.tree
- Change
((A:0.35574,B:0.46298):0.218);
to((C:0.35574,D:0.46298):0.7, (A:0.35574,B:0.46298):0.218);
- Close the text editor
Now the small.tree is has some structural changes (notice how there is no red, because we did a git reset)
- Add and commit the new changes
git add small.tree ; git commit
- Now, gitk will show something like this
- Repeat if you need to change more data
V. Looking at the branches and Merging one into another
- Look at all the branches (you should at least have "master", "original", and "red")
git branch
- Take a look at the 'red' branch
git checkout red git branch # the branches cat small.tree # the data
- Take a look at the 'master' branch
git checkout master git branch # the branches cat small.tree # the data
- Merge the "red" branch into the "master" (current) branch
git merge red cat small.tree # the results of the merge
In graphical Git repository browser, click File->Update or press F5
- Now, gitk will show something like this
Do you see how the new commit was created to show that there was a merge?
- Now, gitk will show something like this
- The two independent changes were automatically merged together, which can be seen in the resulting small.tree:
VI. Learning more about Git
The official Tutorial - http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html
The complete User Manual - http://www.kernel.org/pub/software/scm/git/docs/user-manual.html