Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to clone a bitbucket repository files in text(ASCII) format than in binary format

Krishnaveni0426 May 15, 2018

when a git clone is happening .. is there any way we can specify to clone repository files in ASCII/text format but not in binary 

1 answer

0 votes
Adam
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2018

Binary vs ASCII isn't something that your Git host is usually very involved in, but Git itself might be able to help. One option is to use .gitattributes to specify whether a given file extension (or files matching another pattern) should be treated as binary.  Here's the Git docs You commit the .gitattributes file into your repository, and each line is a pattern like:

 

*.txt  text

Then when someone clones, the file will be treated as text.

 

If you're instead asking about a way to request the text files but hold off on downloading the big binary files, you're probably asking about LFS. LFS is supported by Bitbucket Server and Cloud alike and, when enabled, stores your large binary files separately from the Git objects. It only downloads binary files that you actually need (e.g. for the version you're checking out) rather than a full history. You do need to set it up on the client machines as well, otherwise you won't see the binary versions of files. See this LFS doc for details.

Good luck!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events