• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 1.0.6
    • General, Git
    • None
    • SourceTree for Windows using Git
      Windows 7 64-bit

      I would like to move or rename an existing file, but cannot do this from within SourceTree.

      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 (see attached image: sourcetree-screen-1.png).

      Right clicking on the file gives me a context menu without the possibility to rename/move the file (see attached image: sourcetree-screen-3.png).

      But when I look in the "Actions" menu can I see the "Move..." action, but greyed out (see attached image: sourcetree-screen-2.png).

        1. sourcetree-screen-1.png
          sourcetree-screen-1.png
          83 kB
        2. sourcetree-screen-1.png
          sourcetree-screen-1.png
          83 kB
        3. sourcetree-screen-2.png
          sourcetree-screen-2.png
          80 kB
        4. sourcetree-screen-2.png
          sourcetree-screen-2.png
          80 kB
        5. sourcetree-screen-3.png
          sourcetree-screen-3.png
          102 kB

            [SRCTREEWIN-821] File rename / move not supported?

            JDFagan added a comment -

            Ohh, I just found out how to do that via repository specific Settings > Advanced > Edit Config File...

            Is there a way to do mod this config globally for git so it applies by default for all future Git repos?

            JDFagan added a comment - Ohh, I just found out how to do that via repository specific Settings > Advanced > Edit Config File... Is there a way to do mod this config globally for git so it applies by default for all future Git repos?

            JDFagan added a comment -

            Can you at least allow SourceTree to modify the git config for ignorecase (i.e., git config core.ignorecase false) while still making use of your embedded Git version?

            JDFagan added a comment - Can you at least allow SourceTree to modify the git config for ignorecase (i.e., git config core.ignorecase false) while still making use of your embedded Git version?

            No. Git never records file renames explicitly anyway, it 'discovers' them when parsing the history. The reason they give is that git is a content tracker not a file tracker (filenames are just descriptors pointing to content) and therefore it's much better to let git find changed code across files on its own. Even if you used 'git mv oldname newname' is just a synonym for:

            mv oldname newname
            git add newname
            git rm oldname
            

            There is no 'real' move command. That's why renaming in Explorer and using Add/Remove does the same thing.

            Steve Streeting (Inactive) added a comment - No. Git never records file renames explicitly anyway, it 'discovers' them when parsing the history. The reason they give is that git is a content tracker not a file tracker (filenames are just descriptors pointing to content) and therefore it's much better to let git find changed code across files on its own. Even if you used 'git mv oldname newname' is just a synonym for: mv oldname newname git add newname git rm oldname There is no 'real' move command. That's why renaming in Explorer and using Add/Remove does the same thing.

            Doesn't that break the history of the file? It seems like the file at the new location would not see the history of the file at the old location the file was treated as two separate files using add/remove.

            Joseph Chang added a comment - Doesn't that break the history of the file? It seems like the file at the new location would not see the history of the file at the old location the file was treated as two separate files using add/remove.

            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.

            Steve Streeting (Inactive) added a comment - 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.

            Can some one please remove the duplicate images? I accidentally added screens 1 and 2 for a second time.

            Nathan Huizinga added a comment - Can some one please remove the duplicate images? I accidentally added screens 1 and 2 for a second time.

              sstreeting Steve Streeting (Inactive)
              9b42dbdf1c8f Nathan Huizinga
              Affected customers:
              0 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: