A
A
Alexander Andreev2018-08-23 11:07:11
git
Alexander Andreev, 2018-08-23 11:07:11

Is it possible to skip one commit when updating a branch with git pull?

The essence of the problem is that the server is behind the git by 3 commits, the second of them, apparently due to the programmer's park, got backup copies of the site weighing 4+ gigabytes. When executing the git pull origin master command, it takes a very long time to load the 2nd commit with backups, and then the error fatal: Out of memory? mmap failed: Cannot allocate memory .
Is it possible to somehow skip a commit containing backups? It contains only backups, 2 huge files and that's it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-08-30
@dlnsk

I recommend rolling back and deleting this commit. Then upload the changes to the server git push -f.
Then all developers will need to do the following (to preserve local commits already made):

git checkout master
git branch new-branch-to-save-current-commits
git fetch --all
git reset --hard origin/master

After that, with the help git cherry-pickyou need to transfer your local commits to master.
PS: Keep in mind that if you don't get rid of these large files now, they will stay there forever and git revertwon't even purge them from the repository.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question