Note that there are some explanatory texts on larger screens.

plurals
  1. POGit Setup (remote and local repo) advice needed
    text
    copied!<p>I bought a personal dev box which I will use for deploying stuff I create on my laptop. I thought it would be a good idea to use Git for code management. The idea was that I will keep committing on my laptop and when needed, will push the changes to the remote dev box. </p> <ol> <li>I initialized a Git repo on the box and </li> <li>cloned it on my laptop. </li> <li><p>But After doing <code>git push</code> I get this error:</p> <p>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</p></li> </ol> <p>I know that the remote repo was not bare.</p> <p>I want to ask if the only way to go with my kind of setup is:</p> <ol> <li>Initialize a bare repo on Server</li> <li>Clone it on my laptop</li> <li>add new files to the local laptop repo and commit the files</li> <li>push to the remote dev box repo</li> </ol> <p>Even this setup gives me errors:</p> <pre><code>No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'master'. fatal: The remote end hung up unexpectedly </code></pre> <hr> <p><em>EDIT</em></p> <p>I tried </p> <pre><code>git push origin master </code></pre> <p>Got this error:</p> <pre><code>error: unable to create directory for .git/refs/remotes/origin/master error: Cannot lock the ref 'refs/remotes/origin/master'. </code></pre> <hr> <p><em>Oh dumb me... I think it is <code>sudo</code> as in</em></p> <p><code>sudo make me intelligent</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload