Should I use push or switch to create branch in bazaar?

John Arbash Meinel john at arbash-meinel.com
Mon Sep 26 15:04:47 UTC 2011


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

On 9/20/2011 9:06 PM, TRIDENT JOB wrote:
> I'asked a question on stackoverflow 
> <http://stackoverflow.com/questions/7482764/should-i-use-push-or-switch-to-create-branch-in-bazaar>,
>
> 
but I don't have the exact answer I figured.
> Maybe I'm wrong on something.
> 
> Here it is:
> 
> To create a branch in bazaar, I can do two things (after a 
> checkout/branch command of the trunk):
> 
> * Do modifications, local commit and then *push* my version to 
> MyProject/MyBranch
> 
> or
> 
> * *Switch* to MyProject/MyBranch (so it creates the branch folder),
> do modification and then commit.
> 
> My questions:
> 
> * Does this two operations produce the same result ? * What is the
> best pratices about branch ?

I generally don't recommend doing a local commit, as it could get
confusing where data is. Especially since a future pull of whatever
your local branch was may or may not match.

I would generally recommend "switch" first, so that you create the
location where you want the commit to be, before you actually commit it.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6AlI8ACgkQJdeBCYSNAAPb0ACdHV9Y2Z/UWCcAjlqmv3Vl2w7J
9tsAnA5qqTAT6qX+4XXbDpQoA42wVSYJ
=bh0P
-----END PGP SIGNATURE-----



More information about the bazaar mailing list