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 --all 

like -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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -