newbie questions about commit/push

Aaron Bentley aaron.bentley at utoronto.ca
Wed Jul 25 16:04:00 BST 2007


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

Damien Moore wrote:
> 3. At the end of the day I push/commit the changes back to the server.
> 
> My questions: what gets pushed?

The whole state of the local branch.

> What I *usually* want is to have the entire commit history (including
> local commits) appearing in the main repository branch, but I could
> see how this would get funky with multiple people making commits

If someone has committed since your last commit/push, you cannot push
until you have locally merged and committed those changes.

With a branch, you do "bzr merge", then commit.  With a checkout, you do
"bzr update", then commit.

> (e.g. I locally commit feature 1 then feature 2 then feature 3 over
> the course of a day. But in the meantime joe pushes changes that
> create a conflict with feature 2. I update to his changes and resolve
> the conflict in a 4th local commit, but then can I only push my first
> and last commits to the server because the others are conflicted?)

Really, you can only push your last commit to the server*.  If you could
push your first commit to the server, that would remove Joe's changes,
because your first commit didn't include those changes.  But since your
fourth commit combines your changes with Joe's, you can push that.

Aaron

* If you really wanted to remove Joe's changes, you could push --overwrite.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGp2Zg0F+nu1YWqI0RAjR+AJ9D/oz3JghUkslccDEj7Q7TVxH2PACfQ0Rn
GlhrwuN7FyHMpY81EA/PXMQ=
=rJtl
-----END PGP SIGNATURE-----



More information about the bazaar mailing list