git push single revision

If I have multiple revision to push to the origin repository, can I pick which ones to push ?

1 answer

In the Push dialog, there are checkboxes on the left side for each branch. The ones you select will be pushed. (All commits in those branches.)

Ok, but can I choose which commits to push from a certain branch, or do I have to push all commits ?

Ok, but can I choose which commits to push from a certain branch, or do I have to push all commits  ?

You cannot choose which commits get pushed from a branch, all commits are pushed.

That's generally true. If for some reason you wanted to push a subset of the commits on a given branch, as long as the commits that you wanted to exclude were at the end of the branch, you could probably do something like: checkout the last commit you want to push create a branch at that commit push your new branch

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

731 views 3 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you