Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 17:45 Go to next message
sakshi kaushik is currently offline sakshi kaushikFriend
Messages: 5
Registered: July 2014
Junior Member
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 19:00 Go to previous message
Konrad Kügler is currently offline Konrad KüglerFriend
Messages: 2
Registered: August 2014
Junior Member
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: Sun Aug 25 11:31:31 GMT 2019

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

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

Back to the top