diff --git a/docs/react-v9/contributing/command-cheat-sheet.md b/docs/react-v9/contributing/command-cheat-sheet.md index 2d7aba0024829c..a715493fbd667a 100644 --- a/docs/react-v9/contributing/command-cheat-sheet.md +++ b/docs/react-v9/contributing/command-cheat-sheet.md @@ -1,4 +1,31 @@ -// TODO #30642 A doc showing a table of every day commands. +This is a helpful list of helpful every day commands. -Assignee - Mason -Reviewer - Esteban +yarn // installs everything. It fixes many things. +yarn buildto package-name // Does a yarn build scoped to a specific package and its dependencies for faster speeds vs building the whole repo. +yarn test // runs a test suite. It is slightly different from the test suite in the CI/CD test suite. Can be run from inside a given package to run faster. +yarn create-package // scaffolds a new package +yarn create-component // scaffolds a new component +yarn change // creates a new change file, if needed +yarn clean // tidies any cached dependencies +yarn start // runs a package. You can select the package of choice. +yarn update-snapshots // updates snapshot tests +yarn run dedupe // dedupes dependencies - necessary to run after any kind of package bump/changes +yarn nx run :generate-api // updates API files +yarn nx run : // runs tasks within a package. [More help here][https://nx.dev/features/run-tasks#running-tasks] + +git checkout user/jdoe/some-fancy-branch-name // checks out an existing branch +git checkout -b user/jdoe/some-fancy-branch-name // creates a branch initially +git status // shows a list of changed files. +git add . // stages all your changed files +git add some/file/name // adds a specific file to the change set +git commit -m "your commit message" // commits all your staged files +git commit -a -m "some commit message" // stages and commits everything in one command. +git pull upstream master // pulls the latest version of master to your local machine from the root repo, not your fork +git rebase master // tacks all your commits from your current branch onto the end of master. Prefer this over merges. +git rebase -i master // shows your list of commits about to rebased before it's committed. +git branch // lists all the branches on your local machine +git push // pushes things to your forked repo, not the main repo. +git push upstream // pushes your branch to the main repo. +git push upstream --force // force is needed after a rebase. + +lage build --to react // build v8 so intellisense works.