+1
Allow 'Push To' from any commit, even without a branch
[1] (master)
[2]
[3]
[4]
For years now, when I want to push commit #3 to a remote, I would do the following workaround:
- Temporary create a branch on that commit without checking out and simply naming it "fddsfdsfdsfdsa".
- Right-click on the branch from the graph
- Push To > enter my desired destination branch name, e.g. "backup"
- Delete the temp branch
As more of my colleagues are using this workaround, I wonder if the Push To functionality can be available when right-clicking on a commit, regardless of whether a branch is there or not.
We are just pushing a commit to a remote, so it shouldn't matter what the source branch is, therefore SmartGit can do the steps above behind the scenes (i.e. adding the temp branch if it's needed by the command line) if there is no existing branch?
Customer support service by UserEcho
Hello,
Can you explain a bit more why you are pushing to a branch remotly, and don't want that branch locally ?
I'm quite surprised, never had to do that...
"don't want that branch locally"
I don't understand the question. Perhaps you missed my overall intention. I'm trying to quickly push a branch that's pointing to a prior commit to remote for various reasons (e.g. backup, passing to another person as starting point, etc,)
Here's a video to explain it:
(sorry for the screen cut off. I basically did: (1) Add fdsfdsa (2) Push To from fdsfdsa (3) Delete fdsfdsa)
I think that is still inline with the "meaning" of Push To, so doesn't clash with the UX. It seems weird that we need a temporary branch initiate the "Push To" action from the context menu.
If the target branch is the same as the head branch, you could use Push Up To.
I'm not sure of the way you are working, that was what I was asking for.
Indeed the manipulation you're talking about surprises me as I'm used to work with feature branch, with a very atomic perimeter, send to remote (and sometimes with a PR associated) if some collaboration is needed. Not sure to understand why you want one commit of your local master to be sent to a dedicated branch on remote : why not have this commit in a feature branch ?
Not sure to understand why you want one commit of your local master to be sent to a dedicated branch on remote
The focus is not about workflow, but to expose the Push To functionality to more scenarios. The reason has been explained, but perhaps the following example that doesn't involve master can help you understand?
[1] (experiment-branch)
[2]
[3]
[4]
[5] <remote: master>
"experiment-branch" is totally local, no tracking. But I want to send 3 and 4 to others to experiment, without me leaving away from 1.
why not have this commit in a feature branch ?
From a git-level point of view, there is no difference, right?
Yup, knew that :)
This is for other remote destinations, which is what "Push To" is for anyway. It's just cutting down one step of creating the temp branch.