Git SCM doesn't work with remote branches
Reported by Adam S | May 8th, 2008 @ 07:29 AM
Currently you can't use the Git deploy for remote branches...
See this thread for more information:
http://groups.google.com/group/c...
I have basically pared down the whole functionality of the current Git module to use the 'correct' basic git functions for the desired functionality (ie to translate into an svn-like 'checkout' && 'update' functions). I have also removed the :remote config option as it serves no useful purpose that I can see (it only changes the name of the 'origin' ref in the checkout branch on the deploy server - which is useless, just call it origin...)
For an svn 'checkout' the correct git commands, as I see it, are:
git clone {repo_url}
git rebase origin/{my_branch}
For svn 'update' the correct git commands are:
git fetch
git rebase origin/{my_branch}
I've left the 'git reset --hard {revision}' so that a specific revision can still be chosen.
Here's the github commit:
http://github.com/adamsalter/cap...
Thanks,
-Adam
Comments and changes to this ticket
-
-
Mislav May 8th, 2008 @ 09:06 AM
-1 on this.
First of all, why exactly the current solution cannot deploy from remote branches? In git terms, please.
Second, can you explain why did you replace this:
git checkout -b deploy #{revision}With:
git rebase origin/#{branch} git reset --hard #{revision}How did that help?
-
Adam S May 9th, 2008 @ 03:33 AM
I've just gone over the old code and think I may have led myself down the garden path... The 'remote' option threw me, being so useless... but that's probably not reason enough to rewrite the code.
Woops ;)
-
Tim Dysinger May 10th, 2008 @ 11:39 AM
The remote option is not useless. I use it all the time.
-
Adam S May 10th, 2008 @ 07:01 PM
Tim,
I guess the remote option is not hurting anything by being there. Could you please email me off ticket with how you feel it is useful? I still can't see any purpose to it... the remote branch may as well be called origin... unless the cap deploy has more than one remote branch...
Ps. I guess this ticket can be closed.
-
Tim Dysinger May 11th, 2008 @ 11:59 AM
The remote lets you switch the remote git repository - it is not the same as branch which lets you switch the branch within that repository. Remember with git you can have dozens of remote repositories. On my team we each have our own remote repository. Sites like github and gitorious allow each developer to fork a project and have their own repository on the remote server.
The :remote option is totally useful.
-
Scott Chacon May 12th, 2008 @ 12:12 PM
- → State changed from new to invalid
- → Assigned user changed from Jamis Buck to Scott Chacon
author asked to close it - Adam S, I would be happy to discuss this with you offline as well
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
