All of lore.kernel.org
 help / color / mirror / Atom feed
* Replacing a Remote Branch
@ 2010-07-23 20:14 Eric James Michael Ritz
  2010-07-23 20:48 ` Thomas Rast
  0 siblings, 1 reply; 7+ messages in thread
From: Eric James Michael Ritz @ 2010-07-23 20:14 UTC (permalink / raw)
  To: git

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hello everyone.  I have a question about pushing branches that I hope
a more experienced user could help me with.

Commonly I run into this situation:

  1. I have pushed a topic branch out to a repo where other developers
  on my team push their work until its ready to be merged.

  2. I realized I need to perform some ‘destructive’ action like
  ‘rebase -i’ or amend the last commit to fix a typo in the message.

  3. Then I want to push the changed branch as a replacement.

Currently I deal with this by running

    $ git push origin :foo && git push origin foo

to replace `foo`.  But is there a shorter way to do this?  I thought
that writing something like

    $ git push origin +foo:foo

may have the intended effect, but I still get a rejection due to a
non-fast-forward, so I am likely misunderstanding the purpose of `+`.

If there is any short-cut for this, I would greatly appreciate it.
And if not, writing a simple script is not a huge hassle :)

- --
Eric James Michael Ritz
Cyber Sprocket Labs
(843) 225-3830
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMSfg7AAoJEEHUZXw5hMWshwAIALOnsArQIWoxXNmOVNvi3ptd
oXpUXbfX2ZgMnhOQAYmJXYjkqc/fKFh+MultDP1PRgQwPdPCEUfK/n5TEJXB66Jf
nsgnGWIHk7nULuKJmCb9BrDd+xVI4tvbhI3gZYXrypoWdrfUat9rlUL52+eiAXp7
CG/FQrSoFRydREGUuAi1UNtTPt9UG2MT65dEx/S8wqRn8phpJHZI94mKOVZ58lI1
oQDfx+Ox6p2RJG/HRrX7/jWOiGzMk3Ix/cToAaltBWWp7MgvDq31pjrN0TZJfUu+
+vcgafAqseXDDuStlEGd8O5WT+uRYjn9/K3YHf55MKsMvKVzNxgS8IHQGzC+Yk4=
=/0uY
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-07-24 16:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-23 20:14 Replacing a Remote Branch Eric James Michael Ritz
2010-07-23 20:48 ` Thomas Rast
2010-07-23 20:52   ` Eric James Michael Ritz
2010-07-24  1:17   ` bill lam
2010-07-24 16:03     ` [PATCH 1/2] Document receive.denyDeleteCurrent Thomas Rast
2010-07-24 16:03       ` [PATCH 2/2] Documentation/git-push: Explain status output in more detail Thomas Rast
2010-07-24 16:07       ` [PATCH v1.1 1/2] Document receive.denyDeleteCurrent Thomas Rast

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.