Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to rename or move a file with SourceTree

Nathan Huizinga July 15, 2013

How can I rename or move a file using sourcetree with a git repository?

I can see the "Move..." menu entry in the Actions menu, but it's greyed out.

3 answers

1 accepted

0 votes
Answer accepted
Nathan Huizinga August 4, 2013

Copy / Move is not supported explicitly yet, but the simple answer for the moment is just to rename outside of SourceTree and use the Add/remove button on the toolbar instead.

See this link for the details.

3 votes
gibbo77 June 6, 2016

Any news about the "move" command ?

With the v1.8.3.0 it still does not work.

Pysis August 4, 2016

=/

bwpoe-axian September 12, 2016

This is ridiculous... how can a tool like this go so long without a working move command?

Filippo Bollini October 24, 2016

It looks like https://jira.atlassian.com/browse/SRCTREEWIN-821 has been closed as duplicate of https://jira.atlassian.com/browse/SRCTREEWIN-45 , which in turn has been closed as "obsolete". Maybe Atlassian need us to open a new (identical) issue for this?

0 votes
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

Hi Nathan,

If the menu option is greyed out then it's usually because the file doesn't exist in the file system. You could have clicked on a line in the log, selected the file and tried to move/rename, but we detect whether the file exists or not. Otherwise, renaming/moving an non-existent file would do nothing.

Check if that file exists in the file system.

Cheers

Nathan Huizinga July 15, 2013

Hi Kieran,

Thanks for the swift response!

The file is an existing file and already part of the git repository. I can see it when selecting the "Show Clean" or "Show All" and it shows up in the File Status list (with a green tick icon in front of it).

So it's there. Right clicking on the file gives me a context menu without the possibility to rename/move the file. But when I look in the "Actions" menu can I see the "Move..." action, but greyed out.

Nathan.

KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

Strange. Could you raise a JIRA ticket over at jira.atlassian.com listing all of the details possible, i.e. location of the file(s) that won't move along with some "ls" output from the terminal to show those files in existence just to make sure we've got all of the details necessary. The project on JIRA is SRCTREE for Mac and SRCTREEWIN for Windows. You can link it back here so I can see it unless you assign it to me.

Cheers!

Nathan Huizinga July 15, 2013
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

Thanks Nathan. This will be looked into early next week. In the meantime you may be able to right click on the file instead?

Nathan Huizinga July 15, 2013

Hi Kieran,

The right-click context menu does not contain any move or rename entry. I've updated the bug report and added a 3rd screen shot.

Nathan

KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2013

Great, thanks for that Nathan. Right click should usually include it, in the meantime unfortunately you'll have to use the git mv command which is very easy anyhow.

Thanks for the added info.

gibbo77 June 9, 2016

I can confirm that the file exist in the file system as told from Nathan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events