Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7403483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:05:49+00:00 2026-05-29T05:05:49+00:00

i want to have the following git workflow, github / \ laptop—–desktop The idea

  • 0

i want to have the following git workflow,

        github
        /    \
  laptop-----desktop    

The idea is that desktop is kept in sync with laptop, and pushing to github happens whenever, from either computer.

Since my laptop is not permantly online, i need a way to pull and push to desktop from laptop. On laptop, i cloned the github repo, and then made a remote for desktop. I then set up a tracking branch (on laptop) to track the branch ‘develop’ on desktop.

> git branch --track develop desktop/develop

I make changes to branch ‘develop’ on laptop, commit, and try to push to desktop i get.

>git push desktop
...
remote: error: refusing to update checked out branch: refs/heads/develop

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 t
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing int
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 som
remote: error: other way.
remote: error: 
remote: error: To squelch this message and still keep the default behaviour, se
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To ssh:// ....
 ! [remote rejected] develop -> develop (branch is currently checked out)

i read a bit about the error and it sounds like the recomended thing to do is to pull from desktop, instead of push from the laptop, but this is not an option.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:05:50+00:00Added an answer on May 29, 2026 at 5:05 am

    git says you right what you have to do: You can set receive.denyCurrentBranch configuration variable to ‘ignore’ or ‘warn’ in the remote repository to allow pushing into
    its current branch
    .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following XML and I want to process it so that I
Backround: Suppose I have the following Git URLs (hosted on github) http://github.com/mikl/drupal.git git://github.com/mikl/drupal.git (Git
I have a git tree that looks like the following: Because of the review
Suppose we have the following repository structure on github: company:project.git \- company:submodule.git A developer
I have following LINQ statement and I want to rewrite it using extension methods.
I have following data in my table. alt text http://img26.imageshack.us/img26/3746/productfield.png I want to extract
Eg. I have following delegate method I want to use as a callback function
I have the following Macro I want to call from within an AutoHotkey script
I have the following scenario where I want to pass in string and a
I have the following code I want to run, but the problem is $this->type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.