Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » Push a specific commit to remote repository
Push a specific commit to remote repository [message #1405984] Fri, 08 August 2014 13:45 Go to next message
Eclipse UserFriend
When i push any commit, it also pushes along all the commits that were not pushed upto this point to remote repo. Is there a way that I can select a specific commit and push only that commit alone to remote repository?
Re: Push a specific commit to remote repository [message #1408672 is a reply to message #1405984] Fri, 15 August 2014 15:00 Go to previous message
Eclipse UserFriend
There is no technical support for this, but you can use (E)Git in a way that makes this work. Instead of doing all your commits on - for example - the master branch, create separate small feature branches for the features/bugs you work on. When a feature is done you can merge its branch into master. This way the commits of other features that are not finished are not on master and will not be pushed to the remote repository when you push master.

Instead of merging, you can also cherry-pick specific commits from other branches using the context menu of a commit in the History view. This applies the selected commit to the current branch (e.g. master). So this is another way to get only the desired commits onto the branch you want to push.
Previous Topic:How to identify Committed but unpushed files
Next Topic:Merge does not respect mergeoptions
Goto Forum:
  


Current Time: Wed Jul 09 09:24:51 EDT 2025

Powered by FUDForum. Page generated in 0.03755 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top