How does one move the contents of a directory or a single file to another directory?
I did the following git mv Jarryd/movementcommands.c src
and got this
fatal: not under version control, source=Jarryd/movementcommands.c, destination=src/movementcommands.c
How should it be moved?
like this git mv Jarryd/movementcommands.c src/movementcommands.c
?
Both forms should work but because your source file isn't under git's control you don't need git mv
, a simple move and add is needed. (I assume that both Jarryd and src are in your git working tree.)
mv Jarryd/movementcommands.c src
git add src/movementcommands.c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With