Download
- Obtaining the Software
- Third Party Resources
- Starting with git
get latest source code
related projects
quick links
Some of this information may not be up to date.
Starting with git
Go to a clean starting place (eg, your home directory):
$ cd $HOME
Clone the repository, we’ll also specify ‘github’ as the name of the remote repository that we’ll be tracking:
$ git clone --origin github git://github.com/olesenm/xml-qstat.git
or $ git clone –origin github http://github.com/olesenm/xml-qstat.git
We now change to the newly created directory:
$ cd xml-qstat/
All of our normal files should be there, as well as the .gitignore hidden file and the .git/ hidden directory. Listing all of the git branches should look like this (* indicates the currently active branch):
$ git branch -l -a
* master
github/HEAD
github/gh-pages
github/master
Now we have a good starting point, we’ll immediately start our own branch. This is an important point. By creating our own branch, we can avoid worrying about clobbering any of our custom settings with future updates. We can pick any convenient name for our branch, but we should avoid master and gh-pages, since they already exist on the github repository and that causes confusion. For the sake of an example, we’ll just call it personal and create if from the current location:
$ git checkout -b personal HEAD
If we check again, we’ll see that we have indeed switched branches:
$ git branch -l -a
master
* personal
github/HEAD
github/gh-pages
github/master
For cleanliness, we’ll remove the tracked branch master, but it can always be reinstated later if desired:
$ git branch -d master
Deleted branch master.
We can now check that everything is as it should be:
$ git status
# On branch personal
nothing to commit (working directory clean)
Since we are on our own branch (personal), we can make changes independent of the upstream branches (github/master).
The first thing we’ll do is adjust the paths to suit our installation. Depending upon your final configuration, you may need to adjust some of the following files:
make-xmlqstat-jar.sh
init-scripts/cocoon
init-scripts/httpi
init-scripts/xmlqstat-cacher
scripts/xmlqstat-cacher.pl
You should also adjust the xmlqstat/config/config.xml to reflect your site (perhaps with your own logo image). If you are using the FlexLM integration (qlicserver), you should also symlink the cache directories at this time under xmlqstat/cache-{clusterName}.
To preserve these initial editing changes thus far, some of the following commands will be useful.
- git status
- check the current of things
- git add -u
- stage updated files for the next commit
- git add file1 .. fileN
- stage new files for the next commit
- git commit
- commit the changes
- git commit –amend
- amend to the previous commit
- git log
- view the commit log
At any time we can also fetch the newest version, without affecting our working directory whatsoever:
- git fetch github
- fetch the lastest version
- git log –stat –no-merges github/master ^HEAD
- view the changes in github/master but not in our branch
- git whatchanged github/master
- to see what changed
Provided that our working directory is clean (no uncommitted changes), we can merge in any upstream changes:
$ git merge github/master
This normally merges without problems, except when you have changed exactly the same lines as have been changed in the github/master. You’ll need to resolve such conflicts by hand (git can’t really tell who should be right in this situation) and commit the finally resolved versions.