Using Git and GitHub

Sign in to queue

Description

In this episode, Robert is joined by Jeremy Foster, who just did a GitHub for Windows users course for Microsoft Virtual Academy. Here, he focuses on how you can use GitHub in both Visual Studio and Visual Studio Code.

Jeremy covers:

  • GitHub Extension for Visual Studio [05:30]
  • Creating and using repos [08:00]
  • Committing changes and syncing [16:50]
  • Downloading, cloning and forking code [28:00]
  • Adding an existing project to GitHub [30:37]
  • Using Git in Visual Studio Code [39:30]

 

 

Embed

Download

Download this episode

The Discussion

  • User profile image
    mik

    Quickest way to add an existing project to source control is to select it in Solution Explorer then select File/Add To Source Control.

    There is a slight problem with this though in that the option doesn't always appear for some reason.

  • User profile image
    mik

    I should really watch the whole vid before I post shouldn't I :-)

  • User profile image
    mick

    After adding your existing project to Source Control select Sync and select Publish To Github (You must be already logged in to Github) and NOT the Publish Git Repo which was what you selected in the vid.

    If you do it this way then a remote repo will be created for you.

    (Here's hoping you didn't discover this in the last 15 mins I have yet to watch:-))

  • User profile image
    VSC

    @Robert noob tip: When git unavailable for whatever reason & the user knows the exact branch and commit to use for building from source, GitHub's web interface with Download as Zip button suffices unless dependent nested repositories are present.

  • User profile image
    fmorriso

    I found the portion of the video that addresses how to use GitHub with Visual Studio 2015 very disappointing, because it never really showed a successful start-to-finish workflow for adding existing solutions/projects to GitHub from within Visual Studio 2015, something I can easily do when working with TFS online.

    After viewing and re-viewing the video, my conclusion is that, in mid-October 2016, using a fully patched Visual Studio 2015 Enterprise Edition, it is still not possible to easily work with GitHub totally within Visual Studio in the manner that I can work with TFS online.

    I hope a future version of Visual Studio will provide a more integrated, full-fledged, first-class "developer experience" when working with GitHub.

  • User profile image
    codefoster

    @fmorriso: I agree that we didn't do a good job of showing that. The main reason is that I'm more versed in the Git integration in Visual Studio Code than in Visual Studio 2015. Also, I tend to do most of my Git from the command line. I'll try to find some time to do some research on if there's an easy flow like you're talking about and blog about it on codefoster.com. Thanks for watching.

  • User profile image
    pickedaname

    As someone who has only used TFS and PVCS, I did get some good, basic information about git and github from this video.

    It did get a little fuzzy and exploratory at about 35:00 (where I was wondering if the refresh option at the top would have made ConsoleApp2 appear), but you must expect this in such an informal structure with another person asking questions on the go.

    Thanks for the vid and I look forward to the aforementioned blog, if not already there.

  • User profile image
    jbarr33

    This was helpful. Thanks for the video. The VS GitHub extension has always been a little confusing.  And although the video doesn't show the full workflow (harsh comment BTW) it demo's that Visual Studio helps in the workflow.

    Regarding adding existing VS projects, I would definitely use the Git Cmd option instead of "add to source control" because the Cmd option allows you to "undo" any adds before you commit them where as "add to source control" publishes everything right away and you can't remove any files.

    Thanks for the video.

Add Your 2 Cents