1 |
Read all of my response before doing anything ;) |
2 |
|
3 |
On Wed, Aug 26, 2009 at 1:05 AM, Sergiy Borodych <bor@×××××××××.ua> wrote: |
4 |
|
5 |
|
6 |
> portage # cd /usr/local/portage/layman/perl-experimental |
7 |
> perl-experimental # git checkout -b alternatives alternatives |
8 |
> fatal: git checkout: updating paths is incompatible with switching |
9 |
> branches. |
10 |
> Did you intend to checkout 'alternatives' which can not be resolved as |
11 |
> commit? |
12 |
|
13 |
|
14 |
I Meant 'git checkout -b alternatives origin/alternatives' , which checkouts |
15 |
out the remote branch 'alternatives' ( on origin ) locally. |
16 |
|
17 |
|
18 |
|
19 |
> I think you mean |
20 |
> |
21 |
> git checkout -b alternatives |
22 |
> git pull origin alternatives |
23 |
|
24 |
|
25 |
Nah, that would just give you 2 copies of master with different names. Git |
26 |
'checkout -b alternatives' just checks out the current branch under the |
27 |
name 'alternatives', not what you want. 'git pull origin alternatives' will |
28 |
then *merge* the foreign branch called "alternatives" into the local branch |
29 |
called "alternatives" ( a derivative of master) , which is not necessarily |
30 |
what you want in all cases. |
31 |
|
32 |
git checkout -b NewbranchName remoteName/branchname |
33 |
|
34 |
Is how I recommend you check out branches locally. |
35 |
|
36 |
|
37 |
> ? |
38 |
> |
39 |
> But now layman -S give me error :( |
40 |
> " |
41 |
> From git://git.overlays.gentoo.org/proj/perl-overlay |
42 |
> 3ddbd1a..43666a7 master -> origin/master |
43 |
> You asked me to pull without telling me which branch you |
44 |
> want to merge with, and 'branch.alternatives.merge' in |
45 |
> your configuration file does not tell me either. Please |
46 |
> specify which branch you want to merge on the command line and |
47 |
> try again (e.g. 'git pull <repository> <refspec>'). |
48 |
> See git-pull(1) for details. |
49 |
> " |
50 |
> |
51 |
|
52 |
This is because above, you appeared to have created a new branch called |
53 |
'alternatives' with no remote name. |
54 |
|
55 |
So when you run "git pull -u -v" in that checked out branch ( what layman |
56 |
does ), it will be going "Ok, you want to update the current branch, hold |
57 |
on, the hell? update from what?!. |
58 |
|
59 |
|
60 |
> |
61 |
> What am I doing wrong? |
62 |
> |
63 |
> Anyway, thanks for advice :) |
64 |
> |
65 |
> P.S. |
66 |
> 5.10.1 out - woohoo :) |
67 |
> |
68 |
> -- |
69 |
> Sergiy Borodych |
70 |
> http://bor.org.ua |
71 |
> |
72 |
> |
73 |
|
74 |
But you no longer need to worry about the branch, as we just merged the |
75 |
branch back into master :D |
76 |
|
77 |
Note, we have 5.10.1 out, *and in overlay* now :D |
78 |
|
79 |
$ cd /tmp/ |
80 |
$ mkdir overlay |
81 |
$ cd overlay |
82 |
$ git clone git://git.overlays.gentoo.org/proj/perl-overlay |
83 |
|
84 |
Initialized empty Git repository in /tmp/overlay/perl-overlay/.git/ |
85 |
remote: Counting objects: 11533, done. |
86 |
remote: Compressing objects: 100% (6340/6340), done. |
87 |
remote: Total 11533 (delta 6653), reused 8927 (delta 5110) |
88 |
Receiving objects: 100% (11533/11533), 2.14 MiB | 426 KiB/s, done. |
89 |
Resolving deltas: 100% (6653/6653), done. |
90 |
|
91 |
$ cd perl-overlay/ |
92 |
$ find dev-lang/perl |
93 |
|
94 |
dev-lang/perl/ |
95 |
dev-lang/perl/perl-5.10.1-r11.ebuild |
96 |
dev-lang/perl/metadata.xml |
97 |
dev-lang/perl/Manifest |
98 |
dev-lang/perl/ChangeLog |
99 |
|
100 |
$ git pull -u -v |
101 |
|
102 |
From git://git.overlays.gentoo.org/proj/perl-overlay |
103 |
= [up to date] master -> origin/master |
104 |
Already up-to-date. |
105 |
|
106 |
|
107 |
|
108 |
-- |
109 |
Kent |
110 |
|
111 |
perl -e "print substr( \"edrgmaM SPA NOcomil.ic\\@tfrken\", \$_ * 3, 3 ) |
112 |
for ( 9,8,0,7,1,6,5,4,3,2 );" |
113 |
|
114 |
http://kent-fredric.fox.geek.nz |