mercurial - Git — tracking the moving of already tracked files -
mercurial has single command addr stages both added , removed paths, able track moving of given file different path in directory.
to in git, find have use 2 separate commands:
git add -u <path>
will note disappearance of files original path, , then
git add <path>
will note appearance somewhere else.
but there doesn't seem one-step equivalent mercurial's addr command. or mistaken?
git has move command can used move files/folders:
git mv <file or directory> <destination> you can use --all or -a flag of add update both new files , removed files in index
git add -a from official linux kernel git documentation git add (emphasis mine):
-a --alllike
-u, match<filepattern>against files in working tree in addition index. means it find new files staging modified content , removing files no longer in working tree.
Comments
Post a Comment