Comments (5)
Thank you for the suggestion. That part of the lesson is already in an individual repository. "Next, we will change the default branch to be called main." is in relation to the repository just created, so the default branch is now main
in that particular repository. I just tested it in a new repository, and once main
is created, an error message is returned if trying to checkout master.
$ git init
Initialized empty Git repository in C:/Users/vlad/repos/test/.git/
vlad@MS-NADF4Y2 ~/repos/test (master)
$ git checkout -b main
Switched to a new branch 'main'
vlad@MS-NADF4Y2 ~/repos/test (main)
$ git checkout master
error: pathspec 'master' did not match any file(s) known to git
do you have a suggestion to make it clearer?
from git-novice.
The lesson says:
Next, we will change the default branch to be called main.
The instructions in this particular lesson do not do anything to change the name of the default branch. Knowing that the default branch is likely already called main
, instead of saying this is something we will do, we could say that we'll check to see what the branch name is, change it if needed, and then continue on.
from git-novice.
Since there are no commits on master
, executing git checkout -b main
effectively changes the name of the default branch to main
. master
can no longer be accessed. So, the default branch of the repository is now main
(or at least will be once a commit is added - technically at this point the repo doesn't have any branches, and executing git branch -a
will return nothing, but this is far beyond a novice lesson).
I appreciate your suggestion to change the text to say we'll check the branch name; feel free to provide example text here if you want to workshop this, or submit a PR.
Also, I recognize that you have elevated privileges in the Carpentries repositories, but please submit PRs from your own forked repo instead of creating new branches in this lesson's repository. Unless there is a new workflow that I'm unaware of? @ErinBecker ??
from git-novice.
There is a proposal in #983 to remove this command from here. The setup suggests to change the default to main, and new git installations should have main as default anyway, so this is unnecessarily confusing for the learners at this stage imho.
from git-novice.
Related Issues (20)
- Is there a supplemental SSH episode?
- We contradict our own advice about forgetting about ssh keys HOT 1
- Suggest flipping order of git clone screenshots HOT 1
- Share what to do if you already have an ssh key HOT 2
- Episode time allotment is inaccurate HOT 4
- Note that there is no response when typing password/pass phrase/etc in your terminal HOT 1
- "AFK" may not be a recognizable term to everyone HOT 1
- README goes to the old lesson template
- Consider updating CONTRIBUTING to require forking regardless of privileges HOT 3
- Misleading Interplay between Episode 4 and 5 HOT 1
- file versions are not saved; changes to files are tracked/recorded HOT 5
- Add note about how rm from command line is irrecoverable HOT 2
- git config `core.autocrlf` option is incorrect
- Maintainer mismatch with website HOT 3
- Move SSH key creation (7.3) to Lesson 2 - Setting Up Git HOT 4
- Connect to preliminary material: Good Enough Practices HOT 4
- Do not mention branches while creating the first repository? HOT 1
- Broken reference in citation episode
- Some images have alt text displayed in lesson
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-novice.