Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/contrib/GitGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ feature branch for making your changes. For example:
git checkout master && git branch shiny-new-feature
git checkout shiny-new-feature
# Or equivalently,
git checkout master && checkout -b shiny-new-feature
git checkout master && git checkout -b shiny-new-feature
Comment on lines 31 to +34
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While your fix for the typo is correct, the entire example block could be simplified to be more direct and idiomatic for a git quickstart guide. The current examples are a bit verbose and show a non-standard way of creating a branch. A single command can achieve the desired outcome of creating a new branch from master and switching to it, which is clearer for new contributors.

Suggested change
git checkout master && git branch shiny-new-feature
git checkout shiny-new-feature
# Or equivalently,
git checkout master && checkout -b shiny-new-feature
git checkout master && git checkout -b shiny-new-feature
# Create a new branch 'shiny-new-feature' from 'master' and switch to it
git checkout -b shiny-new-feature master

```

This changes your working directory to the shiny-new-feature branch. Keep any
Expand Down
Loading