Mandroid
Mandroid

Reputation: 7524

Moving file in git repository

In my local repository, I created a new directory and moved a file to it from another location within repository. Now when I do 'git status', git has already staged the file at new location(shown as 'renamed'), and also shows original file as modified.

So now what I am supposed to do?Do I need to do 'git add' for file shown as modified, and then commit?

Upvotes: 0

Views: 40

Answers (1)

nsg
nsg

Reputation: 129

Yup, just do git add for the file which is shown as modified. Git has Automatically figured out you changed the location, so you can simply add and then commit.

Upvotes: 1

Related Questions