Issue on setting up a Git repo exercise – Clarification needed #32
Labels
GitHub Bug Bash
Feedback logged during GitHub Bug Bash
triaged
This issue is currently being worked on
Describe the bug
Issue on Introduction to Git: Exercise - Try out Git
In the section “Set up your Git repository”, in step 3 and for Git version 2.28.0 or later: It seems that both
git init --initial-branch=main
andgit init -b main
commands initialize a new repository and set the name of the default branch tomain
. So, the user should use only one of these commands.To Reproduce
Steps to reproduce the behavior:
git –version
to check the GitHub version. (Git version used when reporting this issue: 2.33.4)main
.Expected behavior
It seems that the user can use either
git init --initial-branch=main
orgit init -b main
to initialize their new repo and set the name of the default branch tomain
.Based on Git documentation, these two commands are equivalent.
If you use
git init --initial-branch=main
(orgit init -b main
) and thengit status
, you get the following output in cloud shell.(I am a beginner in Git, but it seems that the repo is initialized correctly.)
Screenshots
Output if you use both commands:
Output if you use only one of the above commands (expected output):
Based on this issue, the content can be modified as follows.
There is also a mistake in the name of the branch in the next step of the instructions (Step 4). The current branch is named
main
and notmaster
. The instructions should be modified as follows.Issue:
Expected:
Desktop (please complete the following information):
Smartphone (please complete the following information):
🎓 Add a tag to this issue for your current education role: student, Student Ambassador or educator.
student, Student Ambassador
The text was updated successfully, but these errors were encountered: