Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ When you use the ``--lfs`` option, you will need to make sure you have Git LFS i

Instructions on how to do this can be found on https://git-lfs.github.com.

LFS objects are fetched for all refs, not just the current checkout, ensuring a complete backup of all LFS content across all branches and history.


About Attachments
-----------------
Expand Down
10 changes: 6 additions & 4 deletions github_backup/github_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2090,11 +2090,13 @@ def fetch_repository(
git_command.pop()
logging_subprocess(git_command, cwd=local_dir)
else:
if lfs_clone:
git_command = ["git", "lfs", "clone", remote_url, local_dir]
else:
git_command = ["git", "clone", remote_url, local_dir]
git_command = ["git", "clone", remote_url, local_dir]
logging_subprocess(git_command)
if lfs_clone:
git_command = ["git", "lfs", "fetch", "--all", "--prune"]
if no_prune:
git_command.pop()
logging_subprocess(git_command, cwd=local_dir)


def backup_account(args, output_directory):
Expand Down