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

added init <dir> to show how to create a new repo #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zerothi
Copy link

@zerothi zerothi commented Apr 3, 2024

Added init <dir> to the schematic.

I often find it useful for new git users to play around with local git repo's, and git init is vital in that case.

@@ -106,6 +106,10 @@
"cmd": "branch --track <new branch name> <remote>/<branch>",
"docs": "Create a new local branch from a remote-tracking branch."
},
"init x": {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this is a common command. I tend to use it from canned scripts (like Github that tells me how to run it), so I haven't thought of adding it, but I'm happy to.

@@ -106,6 +106,10 @@
"cmd": "branch --track <new branch name> <remote>/<branch>",
"docs": "Create a new local branch from a remote-tracking branch."
},
"init x": {
"cmd": "init <dir>",
"docs": "Create a new local Git repository in <dir>. The repository starts with no commits."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add any translations? I have hesitated in adding new commands because of the existing translations, but I think it will be OK to add at this point, with AI and all.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm.. I only know english, and danish... So won't be of much help here... :(

@@ -194,6 +194,13 @@ export const commands = [
"key": "branch --track x x",
"tags": "Branching and Merging",
},
{
"left": "workspace",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial reaction was that this doesn't do anything to the local workspace, but only effects the local_repo. I'm curious why it's specified like that?

Copy link
Author

@zerothi zerothi Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely agree...

Perhaps it would be better to have it:

left = right = workspace, because your clone has right = workspace.
I.e. if clone has workspace, then init should too? Otherwise, clone should have right = local_repo?

That might be a better choice?

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 this pull request may close these issues.

2 participants