Git – File Rename

We have seen the basic commands in Git – Setup repository and basic operation

Let add something more in to that, how to rename file with git svn. Here is the command for that,

git mv oldname newname


git mv -f event.php Event.php

here -f stand for force, Force renaming file even if the target exists.

Basically above command line will just do,

git add newname
git rm oldname

git mv command is also use to move file from one to another location. As bellow,

git mv <source> <destination>

2 thoughts on “Git – File Rename

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s