FAQ
I have created a git clone and have been using this to test changes without
affecting the modules in production. The problem is, when I commit the
change it stays in the closed branch, never pushing the change to the
master (origin) branch. How can this be done?

$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 3 commits.
#

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jason Edgecombe at Aug 18, 2013 at 2:58 pm

    On 08/18/2013 02:01 AM, me 1 wrote:
    I have created a git clone and have been using this to test changes without
    affecting the modules in production. The problem is, when I commit the
    change it stays in the closed branch, never pushing the change to the
    master (origin) branch. How can this be done?

    $ git status
    # On branch master
    # Your branch is ahead of 'origin/master' by 3 commits.
    #
    What happens when you run "git push"?

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • James Polley at Aug 18, 2013 at 3:12 pm
    The changes are being commited in the branch called "master" in your local
    checkout, but not being pushed nack up to the origin.

    http://git-scm.com/book/en/Git-Basics-Working-with-Remotes explains how to
    push your changes.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Me 1 at Aug 18, 2013 at 6:36 pm

    On Sunday, August 18, 2013 3:24:40 AM UTC-4, James Polley wrote:
    The changes are being commited in the branch called "master" in your local
    checkout, but not being pushed nack up to the origin.

    http://git-scm.com/book/en/Git-Basics-Working-with-Remotes explains how
    to push your changes.

    Thanks, but I tried this already, but i'm still having errors:

      $ git push
    Counting objects: 5, done.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 308 bytes, done.
    Total 3 (delta 2), reused 0 (delta 0)
    Unpacking objects: 100% (3/3), done.
    remote: error: refusing to update checked out branch: refs/heads/master
    remote: error: By default, updating the current branch in a non-bare
    repository
    remote: error: is denied, because it will make the index and work tree
    inconsistent
    remote: error: with what you pushed, and will require 'git reset --hard' to
    match
    remote: error: the work tree to HEAD.
    remote: error:
    remote: error: You can set 'receive.denyCurrentBranch' configuration
    variable to
    remote: error: 'ignore' or 'warn' in the remote repository to allow pushing
    into
    remote: error: its current branch; however, this is not recommended unless
    you
    remote: error: arranged to update its work tree to match what you pushed in
    some
    remote: error: other way.
    remote: error:
    remote: error: To squelch this message and still keep the default
    behaviour, set
    remote: error: 'receive.denyCurrentBranch' configuration variable to
    'refuse'.
    To /etc/puppet/environments/preprod/../../../puppet
      ! [remote rejected] master -> master (branch is currently checked out)
    error: failed to push some refs to
    '/etc/puppet/environments/preprod/../../../puppet'

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jim Toth at Aug 18, 2013 at 10:14 pm
    There are a few ways to go; probably the best way is to set up a bare
    repository that you push and pull from in both places, but I'd probably add
    the development environment as a remote in the in-production directory.

    cd /path/to/production/repository
    git remote add devel /path/to/development/directory
    git merge --ff-only devel/master

    (--ff-only because I'm paranoid -- that will give you the same sort of
    warnings that "git push" would give you if you the trees had diverged).

    -- Jim Toth

    On Sun, Aug 18, 2013 at 2:36 PM, me 1 wrote:
    On Sunday, August 18, 2013 3:24:40 AM UTC-4, James Polley wrote:

    The changes are being commited in the branch called "master" in your
    local checkout, but not being pushed nack up to the origin.

    http://git-scm.com/book/en/**Git-Basics-Working-with-**Remotes<http://git-scm.com/book/en/Git-Basics-Working-with-Remotes>explains how to push your changes.

    Thanks, but I tried this already, but i'm still having errors:

    $ git push
    Counting objects: 5, done.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 308 bytes, done.
    Total 3 (delta 2), reused 0 (delta 0)
    Unpacking objects: 100% (3/3), done.
    remote: error: refusing to update checked out branch: refs/heads/master
    remote: error: By default, updating the current branch in a non-bare
    repository
    remote: error: is denied, because it will make the index and work tree
    inconsistent
    remote: error: with what you pushed, and will require 'git reset --hard'
    to match
    remote: error: the work tree to HEAD.
    remote: error:
    remote: error: You can set 'receive.denyCurrentBranch' configuration
    variable to
    remote: error: 'ignore' or 'warn' in the remote repository to allow
    pushing into
    remote: error: its current branch; however, this is not recommended unless
    you
    remote: error: arranged to update its work tree to match what you pushed
    in some
    remote: error: other way.
    remote: error:
    remote: error: To squelch this message and still keep the default
    behaviour, set
    remote: error: 'receive.denyCurrentBranch' configuration variable to
    'refuse'.
    To /etc/puppet/environments/preprod/../../../puppet
    ! [remote rejected] master -> master (branch is currently checked out)
    error: failed to push some refs to
    '/etc/puppet/environments/preprod/../../../puppet'

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.


    --
    Jim Toth
    jjtoth@vcu.edu
    Applications Analyst, Technology Services
    (804) 827-1227

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Me 1 at Aug 19, 2013 at 1:04 am

    On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:
    There are a few ways to go; probably the best way is to set up a bare
    repository that you push and pull from in both places, but I'd probably add
    the development environment as a remote in the in-production directory.

    cd /path/to/production/repository
    git remote add devel /path/to/development/directory
    git merge --ff-only devel/master

    (--ff-only because I'm paranoid -- that will give you the same sort of
    warnings that "git push" would give you if you the trees had diverged).

    So you're saying adding to the development environment as a remote in the
    in-production directory is an alternative to using a bare repository then?
    I'm new to git and just trying to find an easy way, if using bare
    repositories is necessary, I don't think git is very good for this at all,
    its too much trouble for what its worth. (except for extremely large
    environments, which is rare)

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jim Toth at Aug 19, 2013 at 1:57 pm

    On Sun, Aug 18, 2013 at 9:04 PM, me 1 wrote:
    On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:

    There are a few ways to go; probably the best way is to set up a bare
    repository that you push and pull from in both places, but I'd probably add
    the development environment as a remote in the in-production directory.

    cd /path/to/production/repository
    git remote add devel /path/to/development/directory
    git merge --ff-only devel/master

    (--ff-only because I'm paranoid -- that will give you the same sort of
    warnings that "git push" would give you if you the trees had diverged).

    So you're saying adding to the development environment as a remote in the
    in-production directory is an alternative to using a bare repository then?
    Yes.

    I'm new to git and just trying to find an easy way, if using bare
    repositories is necessary, I don't think git is very good for this at all,
    its too much trouble for what its worth. (except for extremely large
    environments, which is rare)
    I'd say what it's good for is multi-user environments. Or single-user
    environments, if that user happens to be familiar with git. :-)

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Me 1 at Aug 19, 2013 at 3:45 pm

    On Sun, Aug 18, 2013 at 9:04 PM, me 1 <solar...@gmail.com <javascript:>>wrote:
    On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:

    There are a few ways to go; probably the best way is to set up a bare
    repository that you push and pull from in both places, but I'd probably add
    the development environment as a remote in the in-production directory.

    cd /path/to/production/repository
    git remote add devel /path/to/development/directory
    git merge --ff-only devel/master

    (--ff-only because I'm paranoid -- that will give you the same sort of
    warnings that "git push" would give you if you the trees had diverged).

    So you're saying adding to the development environment as a remote in the
    in-production directory is an alternative to using a bare repository then?
    Yes.

    I'm new to git and just trying to find an easy way, if using bare
    repositories is necessary, I don't think git is very good for this at all,
    its too much trouble for what its worth. (except for extremely large
    environments, which is rare)
    I'd say what it's good for is multi-user environments. Or single-user
    environments, if that user happens to be familiar with git. :-)


    ok, then here is the problem:
    $ git merge --ff-only devel/master
    fatal: 'devel/master' does not point to a commit

    $ git remote -v
    preprod /etc/puppet/environments/preprod/puppet/ (fetch)
    preprod /etc/puppet/environments/preprod/puppet/ (push)

    $ pwd
    /etc/puppet



    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Me 1 at Aug 19, 2013 at 5:17 pm

    On Sun, Aug 18, 2013 at 9:04 PM, me 1 <solar...@gmail.com <javascript:>>wrote:
    On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:

    There are a few ways to go; probably the best way is to set up a bare
    repository that you push and pull from in both places, but I'd probably add
    the development environment as a remote in the in-production directory.

    cd /path/to/production/repository
    git remote add devel /path/to/development/directory
    git merge --ff-only devel/master

    (--ff-only because I'm paranoid -- that will give you the same sort of
    warnings that "git push" would give you if you the trees had diverged).

    So you're saying adding to the development environment as a remote in the
    in-production directory is an alternative to using a bare repository then?
    Yes.

    I'm new to git and just trying to find an easy way, if using bare
    repositories is necessary, I don't think git is very good for this at all,
    its too much trouble for what its worth. (except for extremely large
    environments, which is rare)
    I'd say what it's good for is multi-user environments. Or single-user
    environments, if that user happens to be familiar with git. :-)
    ok, then here is the problem:

    $ git merge preprod/master
    fatal: 'preprod/master' does not point to a commit

    $ git remote -v
    preprod /etc/puppet/environments/
    preprod/puppet/ (fetch)
    preprod /etc/puppet/environments/preprod/puppet/ (push)

    $ pwd
    /etc/puppet


    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Me 1 at Aug 19, 2013 at 5:22 pm

    On Sun, Aug 18, 2013 at 9:04 PM, me 1 <solar...@gmail.com <javascript:>>wrote:
    On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:

    There are a few ways to go; probably the best way is to set up a bare
    repository that you push and pull from in both places, but I'd probably add
    the development environment as a remote in the in-production directory.

    cd /path/to/production/repository
    git remote add devel /path/to/development/directory
    git merge --ff-only devel/master

    (--ff-only because I'm paranoid -- that will give you the same sort of
    warnings that "git push" would give you if you the trees had diverged).

    So you're saying adding to the development environment as a remote in the
    in-production directory is an alternative to using a bare repository then?
    Yes.

    I'm new to git and just trying to find an easy way, if using bare
    repositories is necessary, I don't think git is very good for this at all,
    its too much trouble for what its worth. (except for extremely large
    environments, which is rare)
    I'd say what it's good for is multi-user environments. Or single-user
    environments, if that user happens to be familiar with git. :-)
    ok, then here is the problem:

    $ git merge --ff-only preprod/master
    fatal: 'preprod/master' does not point to a commit

    $ git remote -v
    preprod /etc/puppet/environments/preprod/puppet/ (fetch)
    preprod /etc/puppet/environments/preprod/puppet/ (push)

    $ pwd
    /etc/puppet


    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jim Toth at Aug 19, 2013 at 5:31 pm
    Hmm...you might need to add "git remote update" in there. git pull does
    that by default.


    On Mon, Aug 19, 2013 at 1:22 PM, me 1 wrote:

    On Sun, Aug 18, 2013 at 9:04 PM, me 1 wrote:
    On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:

    There are a few ways to go; probably the best way is to set up a bare
    repository that you push and pull from in both places, but I'd probably add
    the development environment as a remote in the in-production directory.

    cd /path/to/production/repository
    git remote add devel /path/to/development/directory
    git merge --ff-only devel/master

    (--ff-only because I'm paranoid -- that will give you the same sort of
    warnings that "git push" would give you if you the trees had diverged).

    So you're saying adding to the development environment as a remote in
    the in-production directory is an alternative to using a bare repository
    then?
    Yes.

    I'm new to git and just trying to find an easy way, if using bare
    repositories is necessary, I don't think git is very good for this at all,
    its too much trouble for what its worth. (except for extremely large
    environments, which is rare)
    I'd say what it's good for is multi-user environments. Or single-user
    environments, if that user happens to be familiar with git. :-)
    ok, then here is the problem:

    $ git merge --ff-only preprod/master

    fatal: 'preprod/master' does not point to a commit

    $ git remote -v
    preprod /etc/puppet/environments/preprod/puppet/ (fetch)
    preprod /etc/puppet/environments/**preprod/puppet/ (push)

    $ pwd
    /etc/puppet


    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.


    --
    Jim Toth
    jjtoth@vcu.edu
    Applications Analyst, Technology Services
    (804) 827-1227

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Me 1 at Aug 20, 2013 at 3:22 am
    This did it! For a simple setup I think this works great, maybe these
    instructions should go in the docs somewhere?


    Thanks for your help.



    On Monday, August 19, 2013 1:30:57 PM UTC-4, Jim Toth wrote:

    Hmm...you might need to add "git remote update" in there. git pull does
    that by default.



    On Mon, Aug 19, 2013 at 1:22 PM, me 1 <solar...@gmail.com <javascript:>>wrote:
    On Sun, Aug 18, 2013 at 9:04 PM, me 1 wrote:
    On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:

    There are a few ways to go; probably the best way is to set up a bare
    repository that you push and pull from in both places, but I'd probably add
    the development environment as a remote in the in-production directory.

    cd /path/to/production/repository
    git remote add devel /path/to/development/directory
    git merge --ff-only devel/master

    (--ff-only because I'm paranoid -- that will give you the same sort of
    warnings that "git push" would give you if you the trees had diverged).

    So you're saying adding to the development environment as a remote in
    the in-production directory is an alternative to using a bare repository
    then?
    Yes.

    I'm new to git and just trying to find an easy way, if using bare
    repositories is necessary, I don't think git is very good for this at all,
    its too much trouble for what its worth. (except for extremely large
    environments, which is rare)
    I'd say what it's good for is multi-user environments. Or single-user
    environments, if that user happens to be familiar with git. :-)
    ok, then here is the problem:

    $ git merge --ff-only preprod/master

    fatal: 'preprod/master' does not point to a commit

    $ git remote -v
    preprod /etc/puppet/environments/preprod/puppet/ (fetch)
    preprod /etc/puppet/environments/**preprod/puppet/ (push)

    $ pwd
    /etc/puppet


    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to puppet-users...@googlegroups.com <javascript:>.
    To post to this group, send email to puppet...@googlegroups.com<javascript:>
    .
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.


    --
    Jim Toth
    jjt...@vcu.edu <javascript:>
    Applications Analyst, Technology Services
    (804) 827-1227
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Len Rugen at Aug 18, 2013 at 3:49 pm
    Git push?
    On Aug 18, 2013 1:01 AM, "me 1" wrote:

    I have created a git clone and have been using this to test changes
    without affecting the modules in production. The problem is, when I commit
    the change it stays in the closed branch, never pushing the change to the
    master (origin) branch. How can this be done?

    $ git status
    # On branch master
    # Your branch is ahead of 'origin/master' by 3 commits.
    #

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedAug 18, '13 at 6:01a
activeAug 20, '13 at 3:22a
posts13
users5
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase