8

I found a directory named .git/sequencer

Here is its contents:

$ ls
head  todo
$ cat head
d7d462cf3c0896aa09b3dec020cb21d4c4407d91
$ cat todo 
pick d7d462c Initailise repository
pick b88c8bb bash_funcs: add quote_args()

These pick lines make it look like it's the remnants of a rebase or cherry-pick, however:

$ git rebase --abort
No rebase in progress?

Can I safely remove this directory?

Tom Hale
  • 40,825
  • 36
  • 187
  • 242
  • Both cherry-pick and revert use the sequencer. In a reasonably modern Git, `git status` will tell you that you are in the middle of one of these. – torek Sep 21 '16 at 20:44

1 Answers1

11

This looks like the remnants of an incomplete git revert.

I used git revert --quit and the directory disappeared.

The git-revert documentation mentions this directory:

SEQUENCER SUBCOMMANDS

--continue Continue the operation in progress using the information in .git/sequencer. Can be used to continue after resolving conflicts in a failed cherry-pick or revert.

--quit Forget about the current operation in progress. Can be used to clear the sequencer state after a failed cherry-pick or revert.

--abort Cancel the operation and return to the pre-sequence state.

Tom Hale
  • 40,825
  • 36
  • 187
  • 242