Git - pushing specific commit

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I have made several commits on different files, but so far I would like to push to my remote repository only a specific commit.

Is that possible?

Answers

To push up through a given commit, you can write:

git push <remotename> <commit SHA>:<remotebranchname>

provided <remotebranchname> already exists on the remote. (If it doesn t, you can use git push <remotename> <commit SHA>:refs/heads/<remotebranchname> to autocreate it.)

If you want to push a commit without pushing previous commits, you should first use git rebase -i to re-order the commits.

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/3230074/git-pushing-specific-commit

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils