R
R
root092017-08-03 01:03:15
git
root09, 2017-08-03 01:03:15

Deleting/moving git files?

Tell me, is there a way to mark the movement / deletion of a file in git automatically?
That is, to move a file, you need to write git mv file.txt new_dir/txt
To delete git rm file.txt
This is very inconvenient, but if there are several files? or I misunderstood something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Shumkin, 2017-08-10
@ashumkin

movement - no, because Git doesn't keep track of file moves, it can "calculate" them by file similarity, but it doesn't store
deletions as such - yes, see man git-add
-u, --update
-A, --all, --no -ignore-removal
--no-all, --ignore-removal

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question