A getting-started tutorial in git form.
What it does:
It lets you add a subtree to
/buildscripts which contains:
- nice-to-have rake/albacore tasks which haven't been merged with a release of albacore yet
- ilmerge config
- environment configuration through tasks (e.g.
env:releaseor for 'product'-type releases:
- utility scripts for copying
- utility scripts for http://nvie.com/posts/a-successful-git-branching-model/
- resharper naming conventions for the castle project
- this readme
How to use:
If you have a previous /buildscripts folder (1-6), otherwise, step 7:
- Remove the buildscripts from git's index.
- You can squash this commit with 'git rebase -i HEAD~1' and then 's'-key, if you feel up for it.
- Make tmp branch and switch to it to place old buildscripts in it
- Add buildscripts to this branch
- Commit these changes to the tmp branch
- Go back to the branch you came from
git rm -r --cached buildscripts git commit -m "intermediate commit to remove buildscripts from index." git checkout -b tmp git add . git commit -m "branch with buildscripts" git checkout master
You're done with saving what has been in buildscripts. Now let's add the subtree. More Info
- name the other project "Releases", and fetch.
- prepare for the later step to record the result as a merge.
- read "master" branch of Releases to the subdirectory "buildscripts".
- record the merge result.
git remote add -f Releases https://firstname.lastname@example.org/haf/Castle.Releases.git git merge -s ours --no-commit Releases/master git read-tree --prefix=buildscripts/ -u Releases/master git commit -m "Merge Releases project as our subdirectory"
If you have branched off your previous /buildscripts, merge it back in (11-12), otherwise skip this step.
git merge tmp git branch -d tmp
You have applied the code in Releases! Congrats!
Maintain the result with subsequent merges using the "subtree" strategy:
git pull -s subtree Releases master
When this is done, enjoy your work and start configuring your project! First you'll need the rakefile, so do
mv buildscripts/rakefile.rb ./rakefile.rb
then update these files with your project data and paths:
then verify that you have a tools directory and that it contains whatever paths.rb points to.