I'm currently part of a very large open-source project. I'm assigned to work on few features and I'd like to create a branch for each new feature, and once it's done, merge it with the master branch.
For the sake of working from different machines since I move a lot, I decided to push the feature branches to my private repository, say the original repository is origin
and my private repository is private
.
Currently I cloned the project and created 2 branches from master
, feature1-branch
and feature2-branch
. When I tried to push the branches to my private
repository, I get an error because the project contains files that exceed +100mb. (Github max file size limitation)
I changed my .gitignore
to ignore the big files, but it seems since they're committed in previous/history commits, they still get pushed and cause the error.
Is there a way to push only the files in my new commits without pushing all the history commits? I'm guessing that's not an option because that will cause a merge refusal if I try to make a pull request on a different machine (different histories can't be merged I believe)
I'm no expert in Git, so I'm looking for an advise on what's the best way to handle such scenarios?
P.S Currently I just make sure to copy the files I changed and put them in a cloud storage, and copy them back and forth to the project on different machine, but that's tedious and impractical work.
Thanks in advance, cheers.