What I’m trying to do is, to get local clone of dropbox project, make changes then push to this project.
My PC Specs are: Os Win 8 X64, Git-1.7.11
I did following steps:
- Copied original project files into Dropbox folder
- Initialized git repo in project directory which located in local file system, Dropbox folder
- Then cloned this directory by typing
git clone absolute/path/to/the/folder - Made some changes to the files just for testing, committed.. all gone well
- When I tried to push this by typing
git push origin mastergetting this error message

Raw TXT looks like that
$ git push origin master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 322 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 reposit
remote: error: is denied, because it will make the index and work tree incon
ent
remote: error: with what you pushed, and will require 'git reset --hard' to
h
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variabl
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing
remote: error: its current branch; however, this is not recommended unless y
remote: error: arranged to update its work tree to match what you pushed in
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour,
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse
To F:\Cloud\Dropbox\Web Server\pcand.me
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'F:\Cloud\Dropbox\Web Server\pcand.me'
Tried to fully uninstall with cleaning traces and reinstall 3 times, did steps above 2-3 times. Nothing helped
Generally, it’s not a good idea to push to a non-bare repository.
What I’d do is:
Create an empty directory “/path/to/bare/repository”
Enter that directory and do a
This will initialize a git structure that is safe to push into. Don’t put any files from your dropbox folder there.
Create an empty directory “/path/to/working/folder”
Copy the dropbox files there, enter the directory and type the following commands
The
git initcommand doesn’t have the--bareparameter, so this will be a working folder where you can see your files. After you have pushed the files to the “origin” repository, check the contents of the bare repository. You won’t find any readable files there, only your git index.