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

Episode 3 suggests to use git status before initializing a repo, but does not show that #685

Open
jdvorak001 opened this issue Aug 14, 2019 · 8 comments · May be fixed by #980
Open

Episode 3 suggests to use git status before initializing a repo, but does not show that #685

jdvorak001 opened this issue Aug 14, 2019 · 8 comments · May be fixed by #980

Comments

@jdvorak001
Copy link

In a solution to a challenge in Episode 3 we say it would be good practice to check the status of the current directory just before issuing git init. But this practice is not actually shown in the lesson.

As a side-effect, the lesson actually introduces git status without being explicit about it.
I find this a bit underhands.

@jdvorak001
Copy link
Author

And also, Episode 4 first uses git status in a context where it says "If we check the status of our project again".
I believe we should admit that we are introducing git status in Episode 3 already.

jdvorak001 added a commit to jdvorak001/git-novice that referenced this issue Aug 14, 2019
…pentry#685)

- actually teach the good practice of running ``git status`` before ``git init`` to avoid nested repositories
- be clear that ``git status`` is introduced in Episode 3, not 4
- show the contents of a .git sub-directory
- minor re-wordings in Episode 3
@Sipley
Copy link

Sipley commented Jan 15, 2020

I agree. The solution to "Places to Create Git Repositories" is a little confusing because the command git status doesn't give the output shown for the example as given. Suggestion: either move "if it looks like the following, you are good to go to create a new repository" earlier in the lesson when introducing git init or change to "if git status returns the following, it's best to avoid creating a new repository to be sure there is no conflicting repository in the directory". Alternatively, maybe combine the "Places to Create Git Repositories" and "Correcting git init Mistakes" sections, emphasizing the solution for the latter & highlighting the solution for the former as a useful tip?

@jdvorak001
Copy link
Author

@Sipley, thanks for your comments. I suggested a solution to this issue in my pull request #686, which I have just updated with the latest gh-pages contents. Do you think the changes I suggested there could do the job, or should we try to refactor more?

@Sipley
Copy link

Sipley commented Jan 16, 2020

If I understood the changes correctly, yes! I think those are great!

@kekoziar
Copy link
Contributor

In preparation of the new workbench lesson infrastructure, #686 was closed with comments which I will echo here:

PRs should be limited to one issue per PR. The submitted PR attempted to do many things, and so the original issue - introducing git status at the very beginning - was lost and never implemented. I happen to tell learners that if they need to remember only one thing, it's git status. I absolutely agree with and approve moving it to prior to git init with explanation. However, there were questions about the other content that was added to the PR. Please submit issues as separate PRs in the future.

Feel free to submit a solution to move git status prior to git init with explanation after the lesson has migrated to the new infrastructure.

@kekoziar
Copy link
Contributor

In preparation of the new workbench lesson infrastructure, #686 was closed with comments which I will echo here:

PRs should be limited to one issue per PR. The submitted PR attempted to do many things, and so the original issue - introducing git status at the very beginning - was lost and never implemented. I happen to tell learners that if they need to remember only one thing, it's git status. I absolutely agree with and approve moving it to prior to git init with explanation. However, there were questions about the other content that was added to the PR. Please submit issues as separate PRs in the future.

Feel free to submit a solution to move git status prior to git init with explanation after the lesson has migrated to the new infrastructure.

For clarification, I usually introduce git status at the very beginning of episode 2. My words are along the lines of Now, we're going to start with what I think is the most important command to learn. If you need to remember one thing, remember this command: git status then I explain what it does, then I ask if anyone received a response other than what was on my screen. I propose a call-out to indicate that this is a good place to check if learners received anything other than the expected response. Then lead into git config

@unode
Copy link
Contributor

unode commented Nov 21, 2023

Coming from #977, if I understand correctly, introducing git status before git config, in chapter 2, one will need to explain both:

% git status
fatal: not a git repository (or any of the parent directories): .git

and a variation of the next depending on which shell the learner is using:

git: No such file or directory

The first will also require relocating one lesson objective and keypoint from chapter 3 to chapter 2: Git stores all of its repository data in the .git directory. and needs to expand on the explanation that a git repository not only includes a .git sub-directory but also what a parent directory is and that these will be searched as well.

jdvorak001 added a commit to jdvorak001/git-novice that referenced this issue Nov 21, 2023
@jdvorak001 jdvorak001 linked a pull request Nov 21, 2023 that will close this issue
@jdvorak001
Copy link
Author

jdvorak001 commented Nov 21, 2023

I like the stress you place on the command. I'd just be a bit hesitant to place it in Episode 2 as that one is already extremely packed. I'm proposing #980.

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

Successfully merging a pull request may close this issue.

4 participants