Big file support: regular files and git application files in the same windows repo? git add does not work with fatal: this operation should be performed in the work tree

I have a question about using git app in windows. How can I use both files tracked by the git application (large binaries that I don’t want to add git to the repo) and other source files that I want to add to the git repository in the same repository if the git application should use direct mode in windows (and thus does not allow me to use git add, git commit in my files with normal / non-application)?

Here are my steps:

  • mkdir testrepo
  • cd testrepo
  • git init
  • git init application "test application"
  • cp ~ / test.png.
  • git application add test.png
  • git sync application
  • vi normalfile.txt <--- add text to the file, I want git to track this file
  • git add normalfile.txt & lt --- --- this is the problem, since the repo is in direct mode, I cannot git add the file that I want git to track.

git add does not work with fatal: this operation should be performed in the work tree

+4
source share
1 answer

You can "proxy" the git command as follows :

git annex proxy -- git revert HEAD

git annex proxy -- git checkout HEAD^^

git annex proxy -- git mv mydir newname

This is not very convenient, but it should work.

Alternatively, you can clone this repository and configure it as a working directory to click one on the other as desired.

0
source

Source: https://habr.com/ru/post/1583926/


All Articles