Skip to main content
Removed text that is not related to the answer.
Source Link
Victor Yarema
  • 1.4k
  • 15
  • 15

I see two possible solutions.

First solution ("dirty")

Develop using one branch that always has one last commit that adds large files.
All commits except this one should NOT add any of that large files.
To make changes to source files you'll need to commit on top of that large one, and then use git rebase (example that assumes that you are working in master branch: git checkout -b src HEAD~1 && git cherry-pick master && git rebase src master && git branch -d src) command to pop large commit on top of all source commits.
To update the set of large files you'll need to make that large commit to be the last one and amend it instead of creating new one.
In this case you'll be unable to use default git push behavior that makes only fast-forward refs updates and you'll have to make forced updates like git push <repository> +master:master (note the + sign).

Second solution ("clean")

UPD: There is similar question with similar answer Managing large binary files with git.
I noticed that after I wrote my answer.

Create separate repository for large files and use it in main repository as git submodule.
To make modifications to source files you can simply make regular commit in main repo.
And when you'll need to update the set of large files in submodule repo you'll have to amend the only commit there instead of making new one.

P.S. Sorry for my bad English.
P.P.S Don't hesitate to ask if you don't understand something. I'll try to clarify.

I see two possible solutions.

First solution ("dirty")

Develop using one branch that always has one last commit that adds large files.
All commits except this one should NOT add any of that large files.
To make changes to source files you'll need to commit on top of that large one, and then use git rebase (example that assumes that you are working in master branch: git checkout -b src HEAD~1 && git cherry-pick master && git rebase src master && git branch -d src) command to pop large commit on top of all source commits.
To update the set of large files you'll need to make that large commit to be the last one and amend it instead of creating new one.
In this case you'll be unable to use default git push behavior that makes only fast-forward refs updates and you'll have to make forced updates like git push <repository> +master:master (note the + sign).

Second solution ("clean")

UPD: There is similar question with similar answer Managing large binary files with git.
I noticed that after I wrote my answer.

Create separate repository for large files and use it in main repository as git submodule.
To make modifications to source files you can simply make regular commit in main repo.
And when you'll need to update the set of large files in submodule repo you'll have to amend the only commit there instead of making new one.

P.S. Sorry for my bad English.
P.P.S Don't hesitate to ask if you don't understand something. I'll try to clarify.

I see two possible solutions.

First solution ("dirty")

Develop using one branch that always has one last commit that adds large files.
All commits except this one should NOT add any of that large files.
To make changes to source files you'll need to commit on top of that large one, and then use git rebase (example that assumes that you are working in master branch: git checkout -b src HEAD~1 && git cherry-pick master && git rebase src master && git branch -d src) command to pop large commit on top of all source commits.
To update the set of large files you'll need to make that large commit to be the last one and amend it instead of creating new one.
In this case you'll be unable to use default git push behavior that makes only fast-forward refs updates and you'll have to make forced updates like git push <repository> +master:master (note the + sign).

Second solution ("clean")

UPD: There is similar question with similar answer Managing large binary files with git.
I noticed that after I wrote my answer.

Create separate repository for large files and use it in main repository as git submodule.
To make modifications to source files you can simply make regular commit in main repo.
And when you'll need to update the set of large files in submodule repo you'll have to amend the only commit there instead of making new one.

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

I see two possible solutions.

First solution ("dirty")

Develop using one branch that always has one last commit that adds large files.
All commits except this one should NOT add any of that large files.
To make changes to source files you'll need to commit on top of that large one, and then use git rebase (example that assumes that you are working in master branch: git checkout -b src HEAD~1 && git cherry-pick master && git rebase src master && git branch -d src) command to pop large commit on top of all source commits.
To update the set of large files you'll need to make that large commit to be the last one and amend it instead of creating new one.
In this case you'll be unable to use default git push behavior that makes only fast-forward refs updates and you'll have to make forced updates like git push <repository> +master:master (note the + sign).

Second solution ("clean")

UPD: There is similar question with similar answer Managing large binary files with gitManaging large binary files with git.
I noticed that after I wrote my answer.

Create separate repository for large files and use it in main repository as git submodule.
To make modifications to source files you can simply make regular commit in main repo.
And when you'll need to update the set of large files in submodule repo you'll have to amend the only commit there instead of making new one.

P.S. Sorry for my bad English.
P.P.S Don't hesitate to ask if you don't understand something. I'll try to clarify.

I see two possible solutions.

First solution ("dirty")

Develop using one branch that always has one last commit that adds large files.
All commits except this one should NOT add any of that large files.
To make changes to source files you'll need to commit on top of that large one, and then use git rebase (example that assumes that you are working in master branch: git checkout -b src HEAD~1 && git cherry-pick master && git rebase src master && git branch -d src) command to pop large commit on top of all source commits.
To update the set of large files you'll need to make that large commit to be the last one and amend it instead of creating new one.
In this case you'll be unable to use default git push behavior that makes only fast-forward refs updates and you'll have to make forced updates like git push <repository> +master:master (note the + sign).

Second solution ("clean")

UPD: There is similar question with similar answer Managing large binary files with git.
I noticed that after I wrote my answer.

Create separate repository for large files and use it in main repository as git submodule.
To make modifications to source files you can simply make regular commit in main repo.
And when you'll need to update the set of large files in submodule repo you'll have to amend the only commit there instead of making new one.

P.S. Sorry for my bad English.
P.P.S Don't hesitate to ask if you don't understand something. I'll try to clarify.

I see two possible solutions.

First solution ("dirty")

Develop using one branch that always has one last commit that adds large files.
All commits except this one should NOT add any of that large files.
To make changes to source files you'll need to commit on top of that large one, and then use git rebase (example that assumes that you are working in master branch: git checkout -b src HEAD~1 && git cherry-pick master && git rebase src master && git branch -d src) command to pop large commit on top of all source commits.
To update the set of large files you'll need to make that large commit to be the last one and amend it instead of creating new one.
In this case you'll be unable to use default git push behavior that makes only fast-forward refs updates and you'll have to make forced updates like git push <repository> +master:master (note the + sign).

Second solution ("clean")

UPD: There is similar question with similar answer Managing large binary files with git.
I noticed that after I wrote my answer.

Create separate repository for large files and use it in main repository as git submodule.
To make modifications to source files you can simply make regular commit in main repo.
And when you'll need to update the set of large files in submodule repo you'll have to amend the only commit there instead of making new one.

P.S. Sorry for my bad English.
P.P.S Don't hesitate to ask if you don't understand something. I'll try to clarify.

added 232 characters in body
Source Link
Victor Yarema
  • 1.4k
  • 15
  • 15

I see two possible solutions.

First solution ("dirty")

Develop using one branch that always has one last commit that adds large files.
All commits except this one should NOT add any of that large files.
To make changes to source files you'll need to commit on top of that large one, and then use git rebase (example that assumes that you are working in master branch: git checkout -b src HEAD~1 && git cherry-pick master && git rebase src master && git branch -d src) command to pop large commit on top of all source commits.
To update the set of large files you'll need to make that large commit to be the last one and amend it instead of creating new one.
In this case you'll be unable to use default git push behavior that makes only fast-forward refs updates and you'll have to make forced updates like git push <repository> +master:master (note the + sign).

Second solution ("clean")

UPD: There is similar question with similar answer Managing large binary files with git.
I noticed that after I wrote my answer.

Create separate repository for large files and use it in main repository as git submodule.
To make modifications to source files you can simply make regular commit in main repo.
And when you'll need to update the set of large files in submodule repo you'll have to amend the only commit there instead of making new one.

P.S. Sorry for my bad English.
P.P.S Don't hesitate to ask if you don't understand something. I'll try to clarify.

I see two possible solutions.

First solution ("dirty")

Develop using one branch that always has one last commit that adds large files.
All commits except this one should NOT add any of that large files.
To make changes to source files you'll need to commit on top of that large one, and then use git rebase (example that assumes that you are working in master branch: git checkout -b src HEAD~1 && git cherry-pick master && git rebase src master && git branch -d src) command to pop large commit on top of all source commits.
To update the set of large files you'll need to make that large commit to be the last one and amend it instead of creating new one.
In this case you'll be unable to use default git push behavior that makes only fast-forward refs updates and you'll have to make forced updates like git push <repository> +master:master (note the + sign).

Second solution ("clean")

Create separate repository for large files and use it in main repository as git submodule.
To make modifications to source files you can simply make regular commit in main repo.
And when you'll need to update the set of large files in submodule repo you'll have to amend the only commit there instead of making new one.

P.S. Sorry for my bad English.
P.P.S Don't hesitate to ask if you don't understand something. I'll try to clarify.

I see two possible solutions.

First solution ("dirty")

Develop using one branch that always has one last commit that adds large files.
All commits except this one should NOT add any of that large files.
To make changes to source files you'll need to commit on top of that large one, and then use git rebase (example that assumes that you are working in master branch: git checkout -b src HEAD~1 && git cherry-pick master && git rebase src master && git branch -d src) command to pop large commit on top of all source commits.
To update the set of large files you'll need to make that large commit to be the last one and amend it instead of creating new one.
In this case you'll be unable to use default git push behavior that makes only fast-forward refs updates and you'll have to make forced updates like git push <repository> +master:master (note the + sign).

Second solution ("clean")

UPD: There is similar question with similar answer Managing large binary files with git.
I noticed that after I wrote my answer.

Create separate repository for large files and use it in main repository as git submodule.
To make modifications to source files you can simply make regular commit in main repo.
And when you'll need to update the set of large files in submodule repo you'll have to amend the only commit there instead of making new one.

P.S. Sorry for my bad English.
P.P.S Don't hesitate to ask if you don't understand something. I'll try to clarify.

Source Link
Victor Yarema
  • 1.4k
  • 15
  • 15
Loading