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

Unable to ignore folder structure while exporting in GIT Tortoise

ANSHUMAN PATNAIK April 5, 2018

Hello,

I have a repository which has a lot folders and sub folders.

I use GIT Tortoise to check the files in a particular TAG or commit. But When I try to export the files of that TAG/commit to a specific folder, the files along with the folder structure gets exported.

I just need the changed files to be exported and not the folder structure along with it which contains the file.

Example : If file FileA is changed in folderA of the repo and FileB is changed in folderB the same repo. When I use GIT Tortoise to check the files changed in that commit it shows :-

folderA/FileA

folderB/FileB

And when I export it both the files FileA and FileB get exported along with folderA and folderB. I need to only export the files and not the folders.

Is there to do this ? Please let me know if this can be done in any way using GIT Tortoise or SourceTree. I do not want to use GIT bash for this.

1 answer

0 votes
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 6, 2018

Hi

The export functionality in TortoiseGit uses the git archive functionality see https://git-scm.com/docs/git-archive, this will always export a copy of the full worktree for the selected tag or commit.

I think the closest you will get to what you want in Sourcetree is to open the commit/tag you are interested in and then in the commit details select the files and use the 'Open Selected Version' option.

This will give you the file contents you want, although you will need to manually save them and if you have a lot of files to open it may be quite time consuming.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events