Git & Visual Studio Code Youth Techclub 06.04.2016
Content What is Git? Why do we need it? What are the core principles behind Git? What is GitHub and how to work with it? What is Visual Studio Code and how it integrates with GitHub? How to work with Visual Studio Code extentions?
Agenda Overview of Git and principles behind it Demo of main Git commands Overview of GitHub Demo of main functionality in GitHub Demo of Visual Studio Code Task
What us Git? Free and open source distributed version control system. Popular with open source projects. Allows us to create local repositories based on remote repository and later on push changes from local to remote.
Git distribution Remote Local
Some basic Git terminology Branch – a specific version of code Master branch – initial branch in repository You can branches both locally and remotely.
File status lifecycle in Git
File status in action git init – creates a repository in folder git status – checks the current status of repository git add – adds file to repository, stages the changes git commit – commits changes in the branch Comments: - Each commit is identified by hash number - .git folder contains configuration information about repository
More on branching git branch <branchname> - creates a new local branch git checkout <brachname> - makes the specified branch as active
Branches and commits
Workflow in Git
More commands git push – pushes all commits to the remote branch git fetch - check how far behind local branch is git pull – take all commits that are in the remote branch git checkout – checkout specific branch in local repository git merge – merge changes from one branch into another one P.S. We will check these when we set up GitHub
GitHub Web-based Git repository hosting service. Communities can host open source projects. You can search for projects to participate. Private repositories are possible (of course, you will have to pay for them )
GitHub registration www.github.com Use university email to register with GitHub education pack to get private repositories too.
Demo Create a new empty repository. Add created repository as a remote for local repository. Edit file again, do a commit – see that nothing happens in the remote. Push changes to remote branch.
Visual Studio Code Advanced code editor (similar – Sublime, Atom) Open source, free, by Microsoft A lot of extensions – code snippets, language support Integrates with GitHub P.S. Totally not the same as Visual Studio IDE!
Personal experience Started to work a lot with Team Foundation Server (centralized version control system). Currently working only with Git as it is much easier to work on multiple features and allows code review policy enforced with pull requests.
Demo 1. Create an empty folder, open it in Visual Studio Code 2. Create a new text file and add some text there 3. Initialize new Git repository through Visual Studio Code 4. Commit changes
Task Part I Find Youth Techclub in GitHub un fork web site Do some minor changes and create a pull request Part II Create repository for own project Create initial index.html and basic folder structure in local repository and push code to GitHub
Task (2) Part III Create a repository in the GitHub and put code to it (or use already created one). Add a new member (that sits next to you) as a contributor and be a contributor in some repository. One contributor in repository must create 2 commits, second one also must create 2 commits. Both contributors must push commits to remote. What happens?
Task (3) Part IV Open folder created in Part II in Visual Studio Code. Set up possiblity to push code to remote. Set up storing credentials for Git in global store. P.S. You will need Google for this 
What is next? Date Focused on TBD * Typescript basics TBD Angular 2 basics & project development TBD Project development TBD Project development TBD NodeJS basics & project development * In about two weeks 
Next meetups Closed for people who have participated in at least one open meetup. Same structure: - First some theory and demo - After that tasks to move the project forward Expect to do a lot of Javascript 
Just a reminder www.meetup.com -> great place to follow Youth Techclub Your feedback about 3 open meetups is welcomed: - 3 things that you did not like - 3 things that you really liked - What should we improve? - Any suggestions?

Git hub visualstudiocode

  • 1.
    Git & VisualStudio Code Youth Techclub 06.04.2016
  • 2.
    Content What is Git?Why do we need it? What are the core principles behind Git? What is GitHub and how to work with it? What is Visual Studio Code and how it integrates with GitHub? How to work with Visual Studio Code extentions?
  • 3.
    Agenda Overview of Gitand principles behind it Demo of main Git commands Overview of GitHub Demo of main functionality in GitHub Demo of Visual Studio Code Task
  • 4.
    What us Git? Freeand open source distributed version control system. Popular with open source projects. Allows us to create local repositories based on remote repository and later on push changes from local to remote.
  • 5.
  • 6.
    Some basic Gitterminology Branch – a specific version of code Master branch – initial branch in repository You can branches both locally and remotely.
  • 7.
  • 8.
    File status inaction git init – creates a repository in folder git status – checks the current status of repository git add – adds file to repository, stages the changes git commit – commits changes in the branch Comments: - Each commit is identified by hash number - .git folder contains configuration information about repository
  • 9.
    More on branching gitbranch <branchname> - creates a new local branch git checkout <brachname> - makes the specified branch as active
  • 10.
  • 11.
  • 12.
    More commands git push– pushes all commits to the remote branch git fetch - check how far behind local branch is git pull – take all commits that are in the remote branch git checkout – checkout specific branch in local repository git merge – merge changes from one branch into another one P.S. We will check these when we set up GitHub
  • 13.
    GitHub Web-based Git repositoryhosting service. Communities can host open source projects. You can search for projects to participate. Private repositories are possible (of course, you will have to pay for them )
  • 14.
    GitHub registration www.github.com Use universityemail to register with GitHub education pack to get private repositories too.
  • 15.
    Demo Create a newempty repository. Add created repository as a remote for local repository. Edit file again, do a commit – see that nothing happens in the remote. Push changes to remote branch.
  • 16.
    Visual Studio Code Advancedcode editor (similar – Sublime, Atom) Open source, free, by Microsoft A lot of extensions – code snippets, language support Integrates with GitHub P.S. Totally not the same as Visual Studio IDE!
  • 17.
    Personal experience Started towork a lot with Team Foundation Server (centralized version control system). Currently working only with Git as it is much easier to work on multiple features and allows code review policy enforced with pull requests.
  • 18.
    Demo 1. Create anempty folder, open it in Visual Studio Code 2. Create a new text file and add some text there 3. Initialize new Git repository through Visual Studio Code 4. Commit changes
  • 19.
    Task Part I Find YouthTechclub in GitHub un fork web site Do some minor changes and create a pull request Part II Create repository for own project Create initial index.html and basic folder structure in local repository and push code to GitHub
  • 20.
    Task (2) Part III Createa repository in the GitHub and put code to it (or use already created one). Add a new member (that sits next to you) as a contributor and be a contributor in some repository. One contributor in repository must create 2 commits, second one also must create 2 commits. Both contributors must push commits to remote. What happens?
  • 21.
    Task (3) Part IV Openfolder created in Part II in Visual Studio Code. Set up possiblity to push code to remote. Set up storing credentials for Git in global store. P.S. You will need Google for this 
  • 22.
    What is next? DateFocused on TBD * Typescript basics TBD Angular 2 basics & project development TBD Project development TBD Project development TBD NodeJS basics & project development * In about two weeks 
  • 23.
    Next meetups Closed forpeople who have participated in at least one open meetup. Same structure: - First some theory and demo - After that tasks to move the project forward Expect to do a lot of Javascript 
  • 24.
    Just a reminder www.meetup.com-> great place to follow Youth Techclub Your feedback about 3 open meetups is welcomed: - 3 things that you did not like - 3 things that you really liked - What should we improve? - Any suggestions?