Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issu in levels 4, 16 and so: what you should do #331

Open
E-delweiss opened this issue Feb 3, 2023 · 3 comments
Open

Issu in levels 4, 16 and so: what you should do #331

E-delweiss opened this issue Feb 3, 2023 · 3 comments

Comments

@E-delweiss
Copy link

E-delweiss commented Feb 3, 2023

As mentioned in previous issues, you need to rename your branch as 'master' to passe the level 4 and 16.

You need to do :
git branch -m master

And then continue the game (and/or tap githug play)

@E-delweiss E-delweiss changed the title Issu in levels 4 and 16: what you should do Issu in levels 4, 16 and so: what you should do Feb 5, 2023
@p4ulor
Copy link

p4ulor commented Jun 30, 2023

Level 19, 20, 23, 26, 34 and more. When starting it should say to name the main branch "master" to avoid these problems

@Stowaway4331
Copy link
Contributor

Stowaway4331 commented Oct 31, 2023

Use this command to change the default branch name to master for all levels. You only need to run this once.

git config --global init.defaultBranch master
githug reset

All levels will now use master as the default branch.

@nbehrnd
Copy link
Contributor

nbehrnd commented Apr 3, 2024

If I run the command

git config --list

I obtain one line reading, for example

init.defaultbranch=main

though it could be master, or any_name_you_like. As tested in Linux Debian 13/trixie, as well as from Git Bash in an instance of Windows, this variable's value equally is accessible by

git var GIT_DEFAULT_BRANCH

Thus I think this might resolve githug's problem (on some OSes/setups) with questions 4, 16, 19, 20, 23, 26, 34, etc. so far "patched locally" running git branch -m master: i) read out its value from the host, and eventually ii) let githug set up the principal branch with this name (by default). This edit of the code base would provide enough modernization to warrant the update to 0.6.0 suggested in #345.

To me, this were more promising than to edit the hints to the corresponding questions in line of (for instance level 4/file commit.rb):

hint do
  puts "You must include a message when you commit. If not working, adjust the branch's name by `git branch -m master`."
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants