On Sep 30, 2011, at 11:04 , andy pugh wrote: > On 30 September 2011 17:17, Sebastian Kuzminsky <[email protected]> wrote: > >> Then: "git push origin my-branch:v2.5_branch", and it should work now, >> because my-branch is a fast-forward from origin/v2.5_branch. > > I am very nervous of pushing from within a development branch, as the > last time I tried that I created a new branch in the repository. > Luckily cradek was able to remove it.
I wouldn't worry about that. The second argument to "git push" is "LocalBranch[:RemoteBranch]". If you omit the RemoteBranch it gets the same name as your local branch. If you accidentally make a new branch in the central repo you can remove it by pushing an empty branch to it: "git push origin :my-private-branch" Please don't push an empty branch to v2.4_branch, or any of the other branches we care about, that would remove it! We could get it back without too much trouble, but it would be a bit of a hassle. If you absolutely don't want to push from a private branch to a shared branch like I suggested above, you can do it this way instead: git checkout my-private-branch # hack, hack git fetch origin git rebase origin/v2.5_branch git checkout v2.5_branch # this is my local copy of v2.5_branch git merge --ff my-private-branch # this is a fast-forward, no conflicts git push origin v2.5_branch >>> I wish there was an (easy) git-undo. >> >> There is! As long as you haven't shared, meaning as long as you haven't >> pushed > > Undo push is what I meant. Undoing my own local goofs is reasonably easy. Oh! Heh, for that you'd have to mind-wipe all the rest of us so we forget what you originally pushed! Just include a Langford Visual Hack in your commit message. http://en.wikipedia.org/wiki/David_Langford -- Sebastian Kuzminsky ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
