worktree add already exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




x@y MINGW64 ~/gittest
$ ls
bare/  barework/

x@y MINGW64 ~/gittest
$ ls -a barework
./  ../  test.txt

x@y MINGW64 ~/gittest
$ git -C bare branch
* master

x@y MINGW64 ~/gittest
$ git -C bare worktree add --no-checkout ../barework
Preparing worktree (new branch 'barework')
fatal: '../barework' already exists

x@y MINGW64 ~/gittest
$ git -C bare branch
  barework
* master

Why this doesn't just work and if not why is barework branch made then,
why at all ?

I would like to attach an existing dir to git (make it a workdir) and
then update the index with git reset and checkin the differences.

I can do that tricking around with a little dir renaming, new empty dir,
move the .git file and rename back...






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux