I'm having problems getting hudson to checkout my git repo and merge into master. I'm fairly inexperienced with Git so the terminology (refs etc...) is still all new to me. I've included the output from the Hudson console below:
What I think is happening is that Hudson is checking out the master branch on the remote, but not merging it into it's own master. When I ssh into my server and go to the workspace and type in git branch
the current branch is * (no branch)
and the logs for that "no branch" are up to date.
If I check out the master branch I get Your branch is behind the tracked remote branch 'origin/master' by x commits
So obviously it's not merging into master. How does this work though, how can it merge into "no branch" ??
I've listed my git setup below. Not sure what I need to do to get hudson to merge into it's master branch (or any branch that I specify for that matter) I will eventually be setting it up to have a staging and production branch so I need to make sure that it pulls and merges the proper branch so I can run a deploy. I got those hudson settings from some tutorial I found, so I don't fully understand everything. Why for example, the branch to build is */master instead of just master (it doesn't seem to make a difference if I change it to just master)
Any hints are greatly appreciated!!
Hudson Git Settings
URL of repository: /home/git/repositories/my_repo.git
Name of repository: origin
Refspec: +refs/heads/*:refs/remotes/origin/*
Branches to build: */master
Hudson Git Console Log
Last Built Revision: Revision 6ffd51afe6b87393d3215ab2bb30dbcd2de73dde (origin/master )
Checkout:workspace / /mnt/data/hudson/jobs/MyApp-master/workspace - hudson.remoting.LocalChannel@16a31bf
Fetching changes from the remote Git repository
Fetching upstream changes from /home/git/repositories/my_repo.git
[workspace] $ git fetch /home/git/repositories/my_repo.git +refs/heads/*:refs/remotes/origin/*
From /home/git/repositories/my_repo
6ffd51a..7333c68 master -> origin/master
[workspace] $ git ls-tree HEAD
Seen branch in repository heroku-devel/master
Seen branch in repository origin/staging
Seen branch in repository origin/master
Seen branch in repository origin/production
[workspace] $ git merge-base 45ae1c52e350fc1463f8b057d81b8cd4472ecdd9 7333c68d2b959eec6b472d7897ec30a3a3cfb5b5
Commencing build of Revision 7333c68d2b959eec6b472d7897ec30a3a3cfb5b5 (origin/master )
Checking out Revision 7333c68d2b959eec6b472d7897ec30a3a3cfb5b5 (origin/master )
[workspace] $ git checkout -f 7333c68d2b959eec6b472d7897ec30a3a3cfb5b5
[workspace] $ git tag -a -f -m "Hudson Build #94" hudson-MyApp-master-94
Recording changes in branch origin/master
[workspace] $ git log --numstat -M --summary --pretty=raw 6ffd51afe6b87393d3215ab2bb30dbcd2de73dde..7333c68d2b959eec6b472d7897ec30a3a3cfb5b5
Versions
Hudson: 1.337
Git: 1.5.6.5
Hudson Git Plugin: 0.7.3
Linux: Debian Lenny 5.0.3