Hi

I am sorry for such an elementary question, but using mainly hg, I found
the following very confusing.


I cloned a repository for which 

 git branch -a 

Returns

 git branch -a
* main
  remotes/origin/HEAD -> origin/main
  remotes/origin/feature
  remotes/origin/main

This is a github repository where the default branch is now main not master.

Now I want to commit to the feature branch that has its origin in
github.

So 

 git checkout -b feature 
is not the right thing since it seems to create a local branch feature.

So 

 git checkout -b   remotes/origin/feature

Seems to be correct but 

 git branch -a gives me

  main
* remotes/origin/feature
  remotes/origin/HEAD -> origin/main
  remotes/origin/feature
  remotes/origin/main

So it seems the branch is now duplicated? Confusing. Can I
edit+commit+push without problems? I am afraid to scew up things

Thanks 

Uwe Brauer 
-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

-- 
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/87leod324o.fsf%40mat.ucm.es.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to