Re: [git-users] Checking out a branch

2019-09-05 Thread YUJI SATO
Hello.

Please refer to the URL below.
https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches

I think 'Tracking Branches' section is useful for you.

Thanks.

2019年8月12日月曜日 1時49分51秒 UTC+9 Sharan Basappa:
>
> Alexandra,
>
> Thanks. I will try that. However, its a completely new clone.
> So, what is remote should be present locally also or is it that Git only 
> clones only master to local repo?
>
> Hey, it's because a remote branch.  git checkout -b develop origin/develop
>>
>> On Fri, Aug 9, 2019, 15:38 Sharan Basappa  wrote:
>>
>>> So, I cloned a new repo
>>> I checked out a branch - something like git checkout develop (where 
>>> develop is the branch name)
>>>
>>> Git completed this with the following message:
>>>
>>> Checking out files: 100% (2436/2436), done.
>>> Note: checking out 'develop'.
>>> You are in 'detached HEAD' state. You can look around, make experimental
>>> changes and commit them, and you can discard any commits you make in this
>>> state without impacting any branches by performing another checkout.
>>> If you want to create a new branch to retain commits you create, you may
>>> do so (now or later) by using -b with the checkout command again. 
>>> Example:
>>>   git checkout -b new_branch_name
>>> HEAD is now at 923bf87... Removing RRT (open source) files for delivery 
>>> to customer. Corresponding changes in nightly regression script. Revert to 
>>> earlier version of Tb_Gen.pm (no uvm if changes)
>>>
>>> I am checking the current branch as follows:
>>> [sharanb@clnx1 verifast]$ git branch
>>> * (no branch)
>>>   master
>>> [sharanb@clnx1 verifast]$
>>>
>>> When I list the branches - git branch -r, I get the following:
>>>
>>>   origin/HEAD -> origin/master
>>>   origin/develop
>>>   origin/develop_easel_intel
>>>   origin/master
>>>
>>> I can see develop branch. I am not sure why it fails to checkout.
>>> Any idea what is wrong?
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Git for human beings" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to git-...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/git-users/579f4af2-b4a7-44b8-9447-29a2b1dc9c16%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/a6463e03-033a-40ac-b423-9435b5c53ca0%40googlegroups.com.


Re: [git-users] Checking out a branch

2019-08-11 Thread Sharan Basappa
Alexandra,

Thanks. I will try that. However, its a completely new clone.
So, what is remote should be present locally also or is it that Git only 
clones only master to local repo?

Hey, it's because a remote branch.  git checkout -b develop origin/develop
>
> On Fri, Aug 9, 2019, 15:38 Sharan Basappa  > wrote:
>
>> So, I cloned a new repo
>> I checked out a branch - something like git checkout develop (where 
>> develop is the branch name)
>>
>> Git completed this with the following message:
>>
>> Checking out files: 100% (2436/2436), done.
>> Note: checking out 'develop'.
>> You are in 'detached HEAD' state. You can look around, make experimental
>> changes and commit them, and you can discard any commits you make in this
>> state without impacting any branches by performing another checkout.
>> If you want to create a new branch to retain commits you create, you may
>> do so (now or later) by using -b with the checkout command again. Example:
>>   git checkout -b new_branch_name
>> HEAD is now at 923bf87... Removing RRT (open source) files for delivery 
>> to customer. Corresponding changes in nightly regression script. Revert to 
>> earlier version of Tb_Gen.pm (no uvm if changes)
>>
>> I am checking the current branch as follows:
>> [sharanb@clnx1 verifast]$ git branch
>> * (no branch)
>>   master
>> [sharanb@clnx1 verifast]$
>>
>> When I list the branches - git branch -r, I get the following:
>>
>>   origin/HEAD -> origin/master
>>   origin/develop
>>   origin/develop_easel_intel
>>   origin/master
>>
>> I can see develop branch. I am not sure why it fails to checkout.
>> Any idea what is wrong?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Git for human beings" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to git-...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/git-users/579f4af2-b4a7-44b8-9447-29a2b1dc9c16%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/011a517a-8abb-463b-93c4-6a3795213da5%40googlegroups.com.


Re: [git-users] Checking out a branch

2019-08-09 Thread Alexandra Vass
Hey, it's because a remote branch.  git checkout -b develop origin/develop

On Fri, Aug 9, 2019, 15:38 Sharan Basappa  wrote:

> So, I cloned a new repo
> I checked out a branch - something like git checkout develop (where
> develop is the branch name)
>
> Git completed this with the following message:
>
> Checking out files: 100% (2436/2436), done.
> Note: checking out 'develop'.
> You are in 'detached HEAD' state. You can look around, make experimental
> changes and commit them, and you can discard any commits you make in this
> state without impacting any branches by performing another checkout.
> If you want to create a new branch to retain commits you create, you may
> do so (now or later) by using -b with the checkout command again. Example:
>   git checkout -b new_branch_name
> HEAD is now at 923bf87... Removing RRT (open source) files for delivery to
> customer. Corresponding changes in nightly regression script. Revert to
> earlier version of Tb_Gen.pm (no uvm if changes)
>
> I am checking the current branch as follows:
> [sharanb@clnx1 verifast]$ git branch
> * (no branch)
>   master
> [sharanb@clnx1 verifast]$
>
> When I list the branches - git branch -r, I get the following:
>
>   origin/HEAD -> origin/master
>   origin/develop
>   origin/develop_easel_intel
>   origin/master
>
> I can see develop branch. I am not sure why it fails to checkout.
> Any idea what is wrong?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/git-users/579f4af2-b4a7-44b8-9447-29a2b1dc9c16%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/CAErL4ggDqfmE-QXfRuAQSWXA1wjuUQgtrqR5ctxQfSx6WmA-Bg%40mail.gmail.com.


[git-users] Checking out a branch

2019-08-09 Thread Sharan Basappa
So, I cloned a new repo
I checked out a branch - something like git checkout develop (where develop 
is the branch name)

Git completed this with the following message:

Checking out files: 100% (2436/2436), done.
Note: checking out 'develop'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
  git checkout -b new_branch_name
HEAD is now at 923bf87... Removing RRT (open source) files for delivery to 
customer. Corresponding changes in nightly regression script. Revert to 
earlier version of Tb_Gen.pm (no uvm if changes)

I am checking the current branch as follows:
[sharanb@clnx1 verifast]$ git branch
* (no branch)
  master
[sharanb@clnx1 verifast]$

When I list the branches - git branch -r, I get the following:

  origin/HEAD -> origin/master
  origin/develop
  origin/develop_easel_intel
  origin/master

I can see develop branch. I am not sure why it fails to checkout.
Any idea what is wrong?

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/579f4af2-b4a7-44b8-9447-29a2b1dc9c16%40googlegroups.com.


Re: [git-users] Checking out a branch

2010-08-16 Thread danpreston
On Aug 16, 2010, at 10:16 AM, David Doria wrote:

> It seems like it creates a NEW branch because I get

That's really what you want though.  You can think of the 
remotes/origin/VTK-GraphConversions branch, as your local mirror of the remote 
branch.  You will never commit to it directly because then it wouldn't mirror 
the remote server.  That's why git puts you on a "detached head" when you try 
to check it out.

So what you really want to do is create a local branch that is linked to the 
remote branch, that you can then commit to and push back upstream.  See my 
previous email about how to ensure you get the upstream configuration set up 
using the --track option.

dan

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Checking out a branch

2010-08-16 Thread danpreston
> git checkout -b VTK-GraphConversions origin/VTK-GraphConversions


I don't believe that will setup the upstream configuration.  If you will 
usually be pushing and pulling from this remote branch, you may want to use the 
--track option.  If you use the --track option, you can also omit the -b option 
and it will derive the name of the new branch from the remote name.

git checkout --track origin/VTK-GraphConversions

Alternatively if you feel you will be doing this a lot, you can git config the 
branch.autosetupmerge option.

If you are also going to be creating new branches and publishing them upstream, 
you may want to look into the git-publish-branch tool over at 
http://git-wt-commit.rubyforge.org.  It's a nice intuitive shortcut.

dan

On Aug 16, 2010, at 10:18 AM, Michael P. Soulier wrote:

> David Doria wrote:
> 
>> git checkout remotes/origin/VTK-GraphConversions
> 
> Don't check out remote branches, create your own based on them.
> 
> git checkout -b VTK-GraphConversions origin/VTK-GraphConversions
> 
> Mike
> 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Checking out a branch

2010-08-16 Thread Michael P. Soulier
David Doria wrote:

> git checkout remotes/origin/VTK-GraphConversions

Don't check out remote branches, create your own based on them.

git checkout -b VTK-GraphConversions origin/VTK-GraphConversions

Mike



signature.asc
Description: OpenPGP digital signature


[git-users] Checking out a branch

2010-08-16 Thread David Doria
First, I clone my github repo:

git clone g...@github.com:daviddoria/daviddoria-vtk.git

Then I want to work on a particular branch (there are several - you
can see them here: http://github.com/daviddoria/daviddoria-vtk)

If I 'git branch -a' I see:

[dor...@doriadjec VTK-GraphIterators]$ git branch -a
  VTK-daviddoria
  remotes/origin/HEAD -> origin/VTK-daviddoria
  remotes/origin/VTK-AllProjects
  remotes/origin/VTK-GraphConversions
etc

Then if I

git checkout remotes/origin/VTK-GraphConversions

it says that I am on a detached HEAD

If I instead do

git checkout -b VTK-GraphConversions remotes/origin/VTK-
GraphConversions

It seems like it creates a NEW branch because I get


$ git branch -a
* VTK-GraphConversions
  VTK-daviddoria
  remotes/origin/VTK-GraphConversions

How should I begin working on a branch after I clone the repo?

Thanks!

David

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.