This workshop is designed to show the basics of how to use Git as your Source Control Management Tool. THis is an example of an update.
git pull
git add -A
git commit -m "some commit message"
git push
- Push commited file changes to current branch
- use the
-u upstream_server/branch_name
to push/save to a different server/branch
- See what branch you're currently working on
git branch
- Checkout and create a new branch
git checkout -b <branch_name>
- Merge changes from your branch into another one (3 steps)
- Ensure your changes are added/tracked (
git add -A
) - Ensure your changes have been committed to your current branch
- Checkout your target branch (the branch you want to merge into)
git checkout <branch_name>
- Merge Changes from your Source/Feature Branch and fix any conflicts
git merge <source_branch_name>
- Ensure your changes are added/tracked (
These are the minimum requirements to run this lab.
- A GitHub Account (if you don't already have one)
- Sign-up for Github here
- You can use your MS email address and add a personal one later for recovery and long term purposes
- Sign-up for Github here
- Visual Studio Code Insiders
- VS Code and VS Code Insiders also provide other helpful tools to help accelearte our learning (e.g. built in git support, syntax highlighting)
- Git Installed on your Machine:
You can also run this lab (minus installing Git) in an Azure Cloud Shell (https://shell.azure.com). Git is already installed and you can run a version of VS Code in the browser along side your terminal as well.