All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Alex Marginean'" <alexmarginean16@gmail.com>, <git@vger.kernel.org>
Subject: RE: BUG
Date: Wed, 4 Nov 2020 12:02:43 -0500	[thread overview]
Message-ID: <037901d6b2cc$5362e170$fa28a450$@nexbridge.com> (raw)
In-Reply-To: <CALG6MqwdCmwS5D_F9+q6UYzGm5ZzLL7Bi=rD7Ph2XE0uccu+xg@mail.gmail.com>

On November 4, 2020 11:10 AM, Alex Marginean wrote:
> Github has changed the way they name branches, so now instead of the
> `master` branch there is the `main` branch however, I'm having some trouble
> with the naming
> 
> **Steps to replicate my problem**
> 
> 1. Create a new Github repository and make sure the default branch is `main`
> 2. Add something to the repo, a `README.md` file should be enough 3.
> Instead of cloning the repo make a new directory with your repo's name
> `mkdir <repo_name>` and change the directory to it `cd <repo_name>` 4. `git
> init` 5. Add the remote repo with `git remote add origin <repo_link>` 6. Pull
> the `main` branch from the remote repo with `git pull origin main`.

Use git init --initial-branch=main

This assumes a recent version of git.

> 
> After the step number 6. instead of my branch changing to `main` my current
> branch is changed to `master` which has every file and change of the branch
> `main`. This is a real problem because if I try to push changes to `main`
> although my current branch shows up as `master` it creates another branch
> called `master` on Github and the `main` remains unchanged. Yeah sure I can
> `git checkout main` after that and make my changes there but I'm not sure
> why it defaults to `master` and copies `main` from Github into local branch
> `master`.
> 
> P.S. If you were to use `git fetch origin` instead of `git pull origin
> <branch_name> and then manually change branch to `main` with `git
> checkout main` it would work. Also, if you were to clone the Github repo
> using `git clone <link>` you will get the correct current branch that is `main`.

Regards,
Randall
-- Brief whoami:
 NonStop developer since approximately 211288444200000000
 UNIX developer since approximately 421664400
-- In my real life, I talk too much.


  reply	other threads:[~2020-11-04 17:02 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 16:10 BUG Alex Marginean
2020-11-04 17:02 ` Randall S. Becker [this message]
2020-11-04 17:54 ` BUG Randall S. Becker
  -- strict thread matches above, loose matches on Subject: below --
2020-06-26 21:11 bug Luke Knoble
2019-09-02  3:52 bug liebrecht
2016-11-02 15:04 Bug H-P.Teufel
2016-09-13 17:18 Bug Mike Hawes
2016-09-13 17:26 ` Bug Santiago Torres
2016-09-14 22:14 ` Bug Dennis Kaarsemaker
2016-08-19 20:44 Bug Leonard Bocock
2016-08-23 10:41 ` Bug Luiz Augusto von Dentz
2016-08-24  8:15   ` Bug Leonard Bocock
2015-03-28 14:03 bug Nikita N.
2015-03-30  7:19 ` bug Clemens Ladisch
2015-03-30 10:27   ` bug Nikita N.
2015-03-30 11:13     ` bug Clemens Ladisch
2015-03-30 14:37       ` bug Nikita N.
2015-03-31  7:18         ` bug Eliot Blennerhassett
2015-03-31  8:19           ` bug Nikita N.
2015-03-31  8:38             ` bug Clemens Ladisch
2015-03-31  9:05               ` bug Nikita N.
2015-03-31 12:42                 ` bug Clemens Ladisch
2015-03-31  8:24         ` bug Ricard Wanderlof
2015-03-31  8:56           ` bug Nikita N.
2015-03-31  9:14             ` bug Ricard Wanderlof
2015-03-31 10:26               ` bug Maarten de Boer
2015-03-31 10:49                 ` bug Nikita N.
2015-03-31 11:05                   ` bug Maarten de Boer
2015-03-31 11:44                   ` bug Ricard Wanderlof
2015-03-31  8:54         ` bug Eliot Blennerhassett
2013-11-29 11:28 Bug Otártics András
2013-11-29 11:56 ` Bug Gleb Natapov
2013-10-18 18:53 bug squadrato
2013-08-29  2:34 bug lilofile
2013-08-29  2:43 ` bug Liu Bo
2013-08-29 12:25 ` bug David Sterba
     [not found] <520268D8.3000807@gmail.com>
2013-08-07 17:14 ` bug Mattia Bertoni
2013-08-08  8:44   ` bug Mattia Bertoni
2013-08-08  9:00   ` bug Takashi Iwai
2013-08-08  9:55     ` bug Mattia Bertoni
2013-08-08 10:12       ` bug Takashi Iwai
2013-08-08 10:44         ` bug Mattia Bertoni
2013-08-08 10:49           ` bug Takashi Iwai
2013-06-11 15:11 BUG Mark Murawski
2013-06-12  8:38 ` BUG Duncan
2011-12-19 18:02 Bug Володимир Остап
2011-09-10 13:13 Bug Guido Telscher
2009-11-30 20:39 BUG Plamen Vasilev
2009-07-24 20:28 Bug Steven Pratt
2009-07-24 20:29 ` Bug Chris Mason
2008-08-16  8:36 Bug Artjom
     [not found] <E1JF7vM-0000k1-Mc@linuxtogo.org>
2008-01-17 11:18 ` [oe-commits] org.oe.dev apm: turn off wifi cards before suspend so they are fully reloaded upon resume. closes 3664 Paul Sokolovsky
2008-01-17 11:57   ` Bug ohviey1
2006-01-12 15:23 bug Philippe Delodder
2006-01-14  1:01 ` bug Adrian Bunk
2005-05-19  6:24 bug Victor G. Marimon
2005-05-19  6:24 ` bug Jean Delvare
2005-05-19  6:24 ` bug Jean Delvare
2005-05-19  6:24 ` bug Victor G. Marimon
2005-05-19  6:24 ` bug Victor G. Marimon
2005-05-19  6:24 ` bug Jean Delvare
2005-03-23 10:41 bug Jan Boros
2005-03-23 10:54 ` bug Kay Sievers
2004-01-10 19:54 Bug Tyler Harmor
2004-01-10 21:07 ` Bug Ryan Underwood
2002-03-19 21:20 bug Виталий
2001-09-07 18:42 BUG Attila A Odry
2001-01-31 22:50 BUG Grzegorz Sojka
2001-01-31 23:18 ` BUG James Sutherland
2001-02-01 11:04   ` BUG Maciej W. Rozycki
2001-02-01 11:49 ` BUG Zdenek Kabelac
1998-09-04 18:51 Bug Ulf Carlsson
1998-09-04 21:25 ` Bug ralf
1998-04-03 22:11 fwd: Andreessen Sees Mozilla-Linux Upset Of Windows ralf
1998-04-04 16:30 ` bug Ulf Carlsson
1998-04-04 15:59   ` bug ralf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='037901d6b2cc$5362e170$fa28a450$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=alexmarginean16@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.