TortoiseGit Manual

Copying/Moving/Renaming Files and Folders

It often happens that you already have the files you need in another project in your repository, and you simply want to copy them across. You could simply copy the files and add them as described above, but that would not give you any history. And if you subsequently fix a bug in the original files, you can only merge the fix automatically if the new copy is related to the original in Git.

You can copy files and folders from your working tree to another location in the repository using TortoiseGitBranch/Tag. Refer to the section called “Creating a Branch or Tag” to find out more.

You can locate an older version of a file or folder in the log dialog and copy it to a new location in the repository directly from the log dialog using Context menuCreate branch/tag from revision. Refer to the section called “Getting Additional Information” to find out more.

You can also use the repository browser to locate content you want, and copy it into your working tree directly from the repository, or copy between two locations within the repository. Refer to the section called “The Repository Browser” to find out more.

Cannot copy between repositories

Whilst you can copy and files and folders within a repository, you cannot copy or move from one repository to another while preserving history using TortoiseGit. Not even if the repositories live on the same server. All you can do is copy the content in its current state and add it as new content to the second repository.