Skip to content

Instantly share code, notes, and snippets.

@JimmyMow
Last active December 10, 2018 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JimmyMow/be25123c3a958bd8b1373814255fab74 to your computer and use it in GitHub Desktop.
Save JimmyMow/be25123c3a958bd8b1373814255fab74 to your computer and use it in GitHub Desktop.

Pulling down a PR

You'll usually wanna type git branch to see what branch you're currently on. The master branch is the main branch. All other branches besides master are proposed changes.

Navigate to the Zap Desktop Github org and view the PR you'd like to test. When viewing the PR in the browser on Github you'll notice a branch name and a PR number.

You'll now head back to terminal and execute the following command:

git fetch origin pull/pull_request_number/head:pull_request_branch

Here is an example of the above command with a real PR:

git fetch origin pull/1003/head:renovate/lnd-binary-0.x

Now if you run git branch again you will see a new branch:

* master
  next
  renovate/lnd-binary-0.x

You can checkout to this branch with git checkout your_branch_name to move to that branch:

$ git checkout renovate/lnd-binary-0.x

$ git branch

  master
  next
* renovate/lnd-binary-0.x

Then run yarn to get the new dependencies and then finally yarn dev to start Zap.

After the branch you're testing is merged into master you can delet the branch locally with git branch -D the_branch_name

Pulling the latest master

First make sure you're on the master branch. You can run git branch to see what branch you're on.

If you're not on the master branch you can run git checkout master to move to the master branch.

Once on the master branch run git pull. This will pull down all code changes to master since you've last pulled.

After you've pulled down the recent changes you'll want to run yarn to install any new dependencies.

@lieteau2
Copy link

to update the branch in the future:

  1. make sure you are on the branch git checkout feat/payflow
  2. refetch everything git fetch --all
  3. reset your branch git reset --hard mrfelton/feat/payflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment