[git-users] Git on Windows, permission denied when directory structure does not match between branches

2013-01-21 Thread Donald Blodgett
I am on Windows 7 and every time I switch to a branch that does not have 
the same directory structure as the branch I was in I get permission denied 
errors when ever I attempt to then do a pull, merge, or commit. If I 
attempt to access the directory through other means I get the same error 
message, so it is probably something to do with Windows. Unfortunately this 
only occurs when I switch branches with Git. If I restart the system the 
directory is removed and I can continue, although this is a major drain 
on productivity  Is there another way to correct this issue or preferably 
avoid it altogether?

-- 




Re: [git-users] Git on Windows, permission denied when directory structure does not match between branches

2013-01-21 Thread Konstantin Khomoutov
On Mon, Jan 21, 2013 at 01:13:37PM -0800, Donald Blodgett wrote:

 I am on Windows 7 and every time I switch to a branch that does not have 
 the same directory structure as the branch I was in I get permission denied 
 errors when ever I attempt to then do a pull, merge, or commit. If I 
 attempt to access the directory through other means I get the same error 
 message, so it is probably something to do with Windows. Unfortunately this 
 only occurs when I switch branches with Git. If I restart the system the 
 directory is removed and I can continue, although this is a major drain 
 on productivity  Is there another way to correct this issue or preferably 
 avoid it altogether?

Do you have any sort of IDE or a similar piece of software running while
switching branches?  Windows filesystem semantics are such that if a
process has a directory as its current directory, Windows will prevent
all sorts of manipulations upon that directory, and various IDEs are
known to change their working drectory when, say, opening files through
the standard Open file dialog etc...

P.S.
In either case, specific questions like this should be directed to the
mailing list dedicated to the development of Git for Windows [1], and
you should include your version of Git as well as platform architecture.
Capture (textual) of actual error messages is also a must.

1. http://groups.google.com/group/msysgit

-- 




Re: [git-users] Git on Windows, permission denied when directory structure does not match between branches

2013-01-21 Thread John McKown
I'm a LInux bigot, but use Windows when forced (at work). I am
wondering if perhaps you should git checkout ... to switch to the
branch with problems. Then use Windows Explorer to fix the
permissions. Actually, this is what I think you're doing now. After
this, then in each of the directories which have a permission problem
(or all of them), create a new file such as x.txt. Once you've done
that, do a git add -A . in the working directory, followed by a git
commit -m 'fix permissions, phase 1. Follow that by a git push to
update the remote repository. Now go back into all the subdirectories
and delete the x.txt that you created. Go back to the working
directory and again do a git add -A ., git commit -m 'fix
permissios, phase 2, then git push. I am not certain, but I hope
this will update the directory permissions on your local system and
push them onto the remote repo as well.

Of course, this is just a SWAG.

On Mon, Jan 21, 2013 at 3:13 PM, Donald Blodgett
blodgett.don...@gmail.com wrote:
 I am on Windows 7 and every time I switch to a branch that does not have the
 same directory structure as the branch I was in I get permission denied
 errors when ever I attempt to then do a pull, merge, or commit. If I attempt
 to access the directory through other means I get the same error message, so
 it is probably something to do with Windows. Unfortunately this only occurs
 when I switch branches with Git. If I restart the system the directory is
 removed and I can continue, although this is a major drain on productivity
 Is there another way to correct this issue or preferably avoid it
 altogether?

 --





-- 
Maranatha! 
John McKown

--