File: How_to_cancel_an_add__63__.mdwn

package info (click to toggle)
git-annex 5.20141125%2Bdeb8u1
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 37,832 kB
  • sloc: haskell: 42,603; sh: 1,080; ansic: 498; makefile: 316; perl: 125
file content (5 lines) | stat: -rw-r--r-- 508 bytes parent folder | download | duplicates (11)
1
2
3
4
5
What is the safest way to cancel a `git annex add` before the first commit?

Say I first added a directory with a lot of small files to the annex and then (while watching the endless list of checksum operations) decide I should actually put them in a tar file and annex that instead.

The problem seems to be that `git annex add` immediately replaces the files with symlinks instead of waiting for a commit, so I can't just `git reset largedir/; tar cvfz largedir.tgz largedir/; git annex add largedir.tgz`.