1

I have a problem about using git push on my project. I've 7 commits to push, but they are so big for my internet connection that I can't complete the command.

So I'd like to push the oldest commit, than the second, and so on.

What are the commands to see the commit's name and to push them one at time?

Darko
  • 1,448
  • 4
  • 27
  • 44
  • 1
    possible duplicate of [git - pushing specific commit](http://stackoverflow.com/questions/3230074/git-pushing-specific-commit) – Mathias Dec 30 '14 at 10:28

1 Answers1

2

Let's say you have an historic like this:

A -- B -- C -- D -- E -- F -- G -- H
|                                  |
origin/master                      master

What you want to do is to push only commit B first, then only C, and so on, and so forth.

To do this, you can use several times the command

git push <remote name> <local commit to push>:<remote branch>

ie: use the the successive commands

git push origin B:master
git push origin C:master
...
git push origin H:master

where B should be replaced by the sha1 of the commit B (or by any other way to point at this commit. For example master~6)

gturri
  • 13,807
  • 9
  • 40
  • 57