It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to ignore folder structure while exporting in GIT Tortoise

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 Apr 06, 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
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,895 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you