Skip to content
Chris Achenbach edited this page Feb 21, 2020 · 8 revisions

Welcome to the planetary-config-react wiki!

Installing Stuff

To install developer dependencies onto your computer:

npm install --only=dev

To install webpack:

npm install --save-dev webpack
npm install --save-dev webpack-cli

Git Stuff

Random

description command
Prints out history of commits with a graph that shows merges: git log --oneline --decorate --graph --all
Revert your directory back to latest commit (destroys uncommitted changes) git reset --hard HEAD
Download changes other people have pushed git fetch
Download changes & Update your Repo to the latest commit git pull

Branches

description command
List the branches (with a * next to your current branch) git branch
Move to a different branch git checkout <branchname>
Create new branch & move to it git checkout -b <newbranchname>

Get Other People's Branches

If there are other branches on the github repo, you can fetch all the information by using

git fetch --all

You can list them all by using,

git ls-remote

And if you want to edit on somebody's branch, you need to create your own local copy of the branch. For example, if the branch is named BranchName, here's how you do it:

git checkout -b BranchName origin/BranchName

Merging

In General...

  1. Set your current branch to the "destination" of the merge using git checkout.
  2. git merge <BRANCH>
  3. If (no conflicts), jump to step #5
  4. Manually change files to resolve conflicts.
  5. git commit to finalize the merge.

Whats is this stuff that git added to my file

<<<<<<< HEAD
code on current branch.
=======
code on the other branch.
>>>>>>> testing

Deleting Branches

description command
Delete a Local Branch git branch --delete <branch>
Delete a Branch located on a Remote Machine git push origin --delete <branch>

Tools that help with Merging

ATOM Editor has a built-in plugin for git that helps visualize the merge conflicts. image