Skip to content

Instantly share code, notes, and snippets.

@brygrill
Last active August 21, 2017 13:29
Show Gist options
  • Save brygrill/672bb84b0edd7fa17c347873c82b0fcd to your computer and use it in GitHub Desktop.
Save brygrill/672bb84b0edd7fa17c347873c82b0fcd to your computer and use it in GitHub Desktop.
Github Basics with Visual Studio Code
@brygrill
Copy link
Author

brygrill commented Aug 20, 2017

Push changes

Push changes from the bottom bar:

screenshot 2017-08-20 06 38 34

On Github you will see the pushed branch:

screenshot 2017-08-20 06 52 31

@brygrill
Copy link
Author

brygrill commented Aug 20, 2017

Pull Request

Click on Compare & pull request:

screenshot 2017-08-20 06 52 31

Or:

  • Pull Requests tab
  • New Pull Request
    • Base is parent branch (dev)
    • Compare is your feature branch

Then click on Create pull request:

screenshot 2017-08-20 07 00 00

@brygrill
Copy link
Author

Merge Branch

Click on the Merge pull request button:

screenshot 2017-08-20 07 03 02

And confirm:

screenshot 2017-08-20 07 04 36

Then you can delete the branch if that makes sense for the project/branch:

screenshot 2017-08-20 07 05 23

All changes will now be reflected in the parent branch, dev in our case.

@brygrill
Copy link
Author

Sync changes locally

Check out the parent branch:

screenshot 2017-08-20 07 09 32

Your local version of the parent branch will be behind. Sync the changes from Github:

screenshot 2017-08-20 07 10 44

Optionally, delete your local branch:

$ git branch -d feature/<branch-name>

screenshot 2017-08-20 07 14 03

Optionally, prune origin so your list of remote branches is in sync with Github:

$ git remote prune origin

screenshot 2017-08-20 07 16 56

Before:

screenshot 2017-08-20 07 16 13

After:
screenshot 2017-08-20 07 17 43

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