Author

Topic: git question about weird trees when pulling (Read 1513 times)

legendary
Activity: 1232
Merit: 1076
April 01, 2011, 08:19:19 AM
#9
It looks like at some point your remote machine had a commit that the local or gitorious didn't have. Now every pull from your remote machine is a merge.

Bleh. Will it be fixed then if I do a re-clone and use that one?
legendary
Activity: 1078
Merit: 1005
It looks like at some point your remote machine had a commit that the local or gitorious didn't have. Now every pull from your remote machine is a merge.
legendary
Activity: 1232
Merit: 1076
On my local machine I push some commits:
Code:
* 26810c9 (HEAD, origin/master, master) force fixed precision in exchange rates SQL.
* 2cc7743 fixed conversion function to stop float rounding errors.
* f61ca2e changed exchange rate wording to reflect new alg.
* 08ec5ac fixed decimal places for exchanger.

I login to the remote machine and pull:
Code:
*   d095816 (HEAD, master) Merge branch 'master' of git://gitorious.org/intersango/m
|\ 
| * 26810c9 (origin/master, origin/HEAD) force fixed precision in exchange rates SQL
* |   85590e6 Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * 2cc7743 fixed conversion function to stop float rounding errors.
* |   f354456 Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * f61ca2e changed exchange rate wording to reflect new alg.
* |   37af61e Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * 08ec5ac fixed decimal places for exchanger.
| * ebc9a87 per nanotube's suggestion: switch buy to show sell rates & vice versa.
* |   607d762 Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 

Ugly! I have no local changes on the remote machine. How can I fix the merge graph so it's just a straight line like on my local machine. I don't see why it's needed to do merges when I have no changes locally.
legendary
Activity: 1284
Merit: 1001
I still don't think I understand what you mean. Why do you use graph mode if you don't want the graph? At least I have to add the --graph parameter to get the graph. Perhaps git log --pretty=oneline does what you want?
legendary
Activity: 1232
Merit: 1076
Yep, I get why it's a tree. But I'm wondering if there's a way to prettify it into a list like on my local machine.
legendary
Activity: 1284
Merit: 1001
It all makes sense if you understand that origin/master (on gitorious) is the "real" master, and master on your local and remote machine are two different (local) branches that is just connected to the remote origin/master branch. The branch names on those machines could be anything, "master" is just a default. When you commit to your local machine it all goes into the same branch, so there's no need to show it as a tree. Then you merge them into origin/master with push. When you pull on the remote you merge the changes from origin/master into the local branch called master on that machine, so it makes sense to print it as a tree.
legendary
Activity: 1232
Merit: 1076
How did you expect it to look?

Like the local machine (2nd one). I'm not making any changes there.
legendary
Activity: 1284
Merit: 1001
How did you expect it to look?
legendary
Activity: 1232
Merit: 1076
My workflow working on my Bitcoin site is:
* Fetch encrypted database from server to localhost, unencrypt and load.
* Add new features to local machine & test.
* Push changes to gitorious (git push).
* Login to remote server and pull changes (git pull).

But my graph looks screwy:

Code:
*   d095816 (HEAD, master) Merge branch 'master' of git://gitorious.org/intersango/m
|\ 
| * 26810c9 (origin/master, origin/HEAD) force fixed precision in exchange rates SQL
* |   85590e6 Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * 2cc7743 fixed conversion function to stop float rounding errors.
* |   f354456 Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * f61ca2e changed exchange rate wording to reflect new alg.
* |   37af61e Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * 08ec5ac fixed decimal places for exchanger.
| * ebc9a87 per nanotube's suggestion: switch buy to show sell rates & vice versa.
* |   607d762 Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * 59080d5 per nanotube's suggestion, use best rate for calc rate.
| * 3996ad3 best rates go at the top.
| * 4a29854 reformatted exchange rate SQL.
* |   793fdf5 Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * fdd322a Ability to cancel requests as well as stricter viewing permissions.
| * e140119 protect viewing orders from outside intruders.
| * 69d49b0 cast to string before comparison.
| * dbcb489 fixed typo preventing orders showing up
* |   083d928 Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * 3770477 fix broken require path.
| * 7de5a0b moved into bank subdir. off by default to protected against user error.
* |   6341d52 Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 
| * 09e2947 withdrawal script to GBP bank.
* |   341c06d Merge branch 'master' of git://gitorious.org/intersango/master
|\ \ 
| |/ 

How can I fix that? On my local machine it shows:

Code:
* 26810c9 (HEAD, origin/master, master) force fixed precision in exchange rates SQL.
* 2cc7743 fixed conversion function to stop float rounding errors.
* f61ca2e changed exchange rate wording to reflect new alg.
* 08ec5ac fixed decimal places for exchanger.
* ebc9a87 per nanotube's suggestion: switch buy to show sell rates & vice versa.
* 59080d5 per nanotube's suggestion, use best rate for calc rate.
* 3996ad3 best rates go at the top.
* 4a29854 reformatted exchange rate SQL.
* fdd322a Ability to cancel requests as well as stricter viewing permissions.
* e140119 protect viewing orders from outside intruders.
* 69d49b0 cast to string before comparison.
* dbcb489 fixed typo preventing orders showing up
* 3770477 fix broken require path.
* 7de5a0b moved into bank subdir. off by default to protected against user error.
* 09e2947 withdrawal script to GBP bank.
* f066cf4 denominate all costs in terms of bitcoins.
* bdabf2d verification for bitcoin deposits are now instant.
* 4993f8c synchronise funds laying about.
* ee40599 actually perform query for real.
* ca1cf94 take command line argument.
* d170902 just to be safe.
* a82b1b1 stop it erroring on localhost.
* 5ff5220 actually perform bitcoin withdrawls now.
* de88367 verify only allows deposits.
* b90ec2b add to system in summa the unverified withdrawals.
* 50c2faa sub not add.
* dc719c1 improved summa algorithm
* c3e3ce9 moved missing function back out.
* 5988fe6 fixed missing function.
* 99c7d65 fix GMP problem behaviour.
Jump to: