git-annex/doc/git-annex-restage.mdwn
Joey Hess 2478e9e03a
restage: New git-annex command, handles restaging unlocked files
This is much easier and less failure-prone than having the user run
git update-index --refresh themselves.

Sponsored-by: Dartmouth College's DANDI project
2022-09-23 16:29:59 -04:00

34 lines
901 B
Markdown

# NAME
git-annex restage - restages unlocked files in the git index
# SYNOPSIS
git annex restage
# DESCRIPTION
Since getting or dropping an unlocked file modifies the file in the work
tree, git needs to be told that the modification does not change the
content that it has recorded (the annex pointer). Restaging the file
accomplishes that.
You do not normally need to run this command, because usually git-annex
is able to restage unlocked files itself. There are some situations
where git-annex needs to restage a file, but the git index is locked,
and so it cannot. It will then display a warning suggesting you run this
command.
It's safe to run this command even after you have made a modification to an
unlocked file.
# SEE ALSO
[[git-annex]](1)
[[git-annex-smudge]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.