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

Add switch as alias of checkout to gitGraph Syntax #5422

Closed
jaschop-1k5o opened this issue Mar 27, 2024 · 0 comments · Fixed by #5445
Closed

Add switch as alias of checkout to gitGraph Syntax #5422

jaschop-1k5o opened this issue Mar 27, 2024 · 0 comments · Fixed by #5445
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@jaschop-1k5o
Copy link

jaschop-1k5o commented Mar 27, 2024

Proposal

In the gitGraph diagram, switch should be usable besides checkout to switch branches.

I teach and design workshop material for git beginners. The git switch command is much more beginner friendlly than git checkout and we teach this method first to beginners. Being able to use switch in gitGraph diagrams would reduce confusion when using them to teach git to beginners.

(You may well know, that the git checkout command is much more powerful than git switch and can e.g. checkout arbitrary commits. This is currently not implemented in gitGraph, and checkout seems to function analogous to the git switch command.)

Example

Instead of...

gitGraph
  commit
  branch feature
  commit
  checkout main
  commit
  merge feature

...I would prefer to use...

gitGraph
  commit
  branch feature
  commit
  switch main
  commit
  merge feature

...to produce this diagram.

Screenshots

image

@jaschop-1k5o jaschop-1k5o added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant