Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Git Tags not working as branch definition (git checkout: updating paths is incompatible with switching branches/forcing)?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jörg Battermann  
View profile  
 More options Jan 18 2009, 9:32 am
From: Jörg Battermann <j...@joergbattermann.com>
Date: Sun, 18 Jan 2009 06:32:00 -0800 (PST)
Subject: Git Tags not working as branch definition (git checkout: updating paths is incompatible with switching branches/forcing)?
Hello there,

Quick Q: my production deployment should go on a specific version of
my repository, therefore I keep placing tags whenever I think it's
time again to push an update. Now apparently these tags do exist on
the remote (github) repo as I can see them in the github interface
aswell as when doing a git ls-remote:

macPro:dw-backend joerg$ git ls-remote g...@github.com:joergbattermann/
dw-backend.git v0.2.1
db6491672974bb4fefd06724231e779c63b0744d        refs/tags/v0.2.1

Now when I want to deploy via capistrano, I have the following set in
my deploy.rb:

set :branch, "v0.2.1"
set :rails_env, :production

... looking at the output of cap deploy I get an error pretty early in
the whole process:

cap production deploy
  * executing `production'
    triggering start callbacks for `deploy'
  * executing `multistage:ensure'
  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "git ls-remote g...@github.com:joergbattermann/
dw-backend.git v0.2.1"
  * executing "git clone -q --depth 1 g...@github.com:joergbattermann/
dw-backend.git /home/rails/dw/releases/20090118142245 && cd /home/
rails/dw/releases/20090118142245 && git checkout -q -b deploy
db6491672974bb4fefd06724231e779c63b0744d && git submodule -q init &&
git submodule -q update && (echo
db6491672974bb4fefd06724231e779c63b0744d > /home/rails/dw/releases/
20090118142245/REVISION)"
    servers: ["dw.se"]
    [dw.se] executing command
 ** [dw.se :: out] remote: Counting objects: 242, done.
remote: Compressing objects:   1% (2/182)
remote: Compressing objects:  19% (35/182)
remote: Compressing objects:  37% (68/182)
remote: Compressing objects:  41% (75/182)
remote: Compressing objects: 100% (182/182), done.
 ** [dw.se :: out] remote: Total 242 (delta 61), reused 187 (delta 40)
 ** [dw.se :: out] git checkout: updating paths is incompatible with
switching branches/forcing
 ** Did you intend to checkout
'db6491672974bb4fefd06724231e779c63b0744d' which can not be resolved
as commit?
    command finished
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/rails/dw/releases/20090118142245; true"
    servers: ["dw.se"]
    [dw.se] executing command
    command finished
failed: "sh -c \"git clone -q --depth 1 g...@github.com:joergbattermann/
dw-backend.git /home/rails/dw/releases/20090118142245 && cd /home/
rails/dw/releases/20090118142245 && git checkout -q -b deploy
db6491672974bb4fefd06724231e779c63b0744d && git submodule -q init &&
git submodule -q update && (echo
db6491672974bb4fefd06724231e779c63b0744d > /home/rails/dw/releases/
20090118142245/REVISION)\"" on dw.se

Any idea what I'm doing wrong or what I could do?

Cheers,
-J


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jörg Battermann  
View profile  
 More options Jan 18 2009, 10:22 am
From: Jörg Battermann <j...@joergbattermann.com>
Date: Sun, 18 Jan 2009 07:22:12 -0800 (PST)
Local: Sun, Jan 18 2009 10:22 am
Subject: Re: Git Tags not working as branch definition (git checkout: updating paths is incompatible with switching branches/forcing)?
Just gave it a try with a real remote branch & it's working... with
tags it wasn't.. hrm :-/

On Jan 18, 3:32 pm, Jörg Battermann <j...@joergbattermann.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mislav Marohnić  
View profile  
 More options Jan 18 2009, 2:43 pm
From: "Mislav Marohnić" <mislav.maroh...@gmail.com>
Date: Sun, 18 Jan 2009 20:43:44 +0100
Local: Sun, Jan 18 2009 2:43 pm
Subject: Re: [Capistrano] Re: Git Tags not working as branch definition (git checkout: updating paths is incompatible with switching branches/forcing)?

Did you git push --tags?

On Sun, Jan 18, 2009 at 16:22, Jörg Battermann <j...@joergbattermann.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jörg Battermann  
View profile  
 More options Jan 18 2009, 2:55 pm
From: Jörg Battermann <j...@joergbattermann.com>
Date: Sun, 18 Jan 2009 11:55:28 -0800 (PST)
Local: Sun, Jan 18 2009 2:55 pm
Subject: Re: Git Tags not working as branch definition (git checkout: updating paths is incompatible with switching branches/forcing)?
Hello Mislav,

yep... just double checked:

macPro:dw.se-backend joerg$ git push --tags
Everything up-to-date

-J

On Jan 18, 8:43 pm, "Mislav Marohnić" <mislav.maroh...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mislav Marohnić  
View profile  
 More options Jan 18 2009, 2:59 pm
From: "Mislav Marohnić" <mislav.maroh...@gmail.com>
Date: Sun, 18 Jan 2009 20:59:26 +0100
Local: Sun, Jan 18 2009 2:59 pm
Subject: Re: [Capistrano] Re: Git Tags not working as branch definition (git checkout: updating paths is incompatible with switching branches/forcing)?

2009/1/18 Jörg Battermann <j...@joergbattermann.com>

> Hello Mislav,

> yep... just double checked:

> macPro:dw.se-backend joerg$ git push --tags
> Everything up-to-date

Well, my suggestion was stupid because you don't need to push tags to deploy
a tag. Capistrano resolves branch/tag names *locally* on your machine and
later uses the raw SHA1 in the deployment process. You have to make sure
that the branch this commit is part of is pushed to your repo.

If it is, and apparently you've made sure it's fine, I can't really tell
what's the problem.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jörg Battermann  
View profile  
 More options Jan 19 2009, 2:33 am
From: Jörg Battermann <j...@joergbattermann.com>
Date: Sun, 18 Jan 2009 23:33:22 -0800 (PST)
Local: Mon, Jan 19 2009 2:33 am
Subject: Re: Git Tags not working as branch definition (git checkout: updating paths is incompatible with switching branches/forcing)?
Yeah... the tagged branch was actually the (remote) master one... and
fully pushed.

Oh well. An own branch (e.g. production) which I update from the
master one on specific occasions works instead of tags, so that's fine
for me, too... but it according to the documentation and after having
a quick glimpse into the code it 'should' work with tags, too...
That's why I was a little bit confused here.

Cheers,
-J

On Jan 18, 8:59 pm, "Mislav Marohnić" <mislav.maroh...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »