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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -