-
Notifications
You must be signed in to change notification settings - Fork 101
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Nick Papior <[email protected]>
@@ -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": { |
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
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.