-
Notifications
You must be signed in to change notification settings - Fork 541
GitHub and how to work with Open Source in Visual Studio
Git is code versioning system. It supports having a history of all the changes that happened at any given time for files that were placed in it. Git works on both local and remote levels, so you can even use it without any website, just on your local machine.
There are many different ways to work with git. Don't be intimidated by all the options that there are. For 95% of all the use cases, basic git commands or tools are good enough and are not hard to get used to.
The most direct way is by using git bash. However, working with git bash requires you to memorize all sorts of different commands and might be intimidating.
TODO: finish
Visual studio with git extensions supports working with git and most common of its' host: github, azure...
If you are interested about working with Github in Visual Studio here is a step by step flow:
Gitflow for Visual Studio
TODO: add more tools
Understanding git comes down to understanding how do files move from one place to another. And it's quite simple, because there are 3 places in total!
Working directory is your normal directory where all the work happens. It's any folder really and has little to do with git. Git is related to working directory only because there is an index file which stores all status updates.
Untracked-
A file is not a part of git yet, it does not exist outside your local environment.
Unmodified-
A file is being tracked by git, but has no local changes and so can be ignored for now.
Modified-
A file has been modified locally. You need to stage files for them to be moved further down the git pipeline.
Staged-
A file that is ready to be commited
This is the most simple of all the areas. It serves as an intermediate area between git and working directory. Files in staging area are the files that will be commited with the statuses they were added there. You can add all files to staging area using this git command:
git add .
Add moves files from working area to staging area. However, if you changed any of the added files, they are already staged and for their status to be updated again, you need to do the same command again.
Repository is the last place where files in git end up. It's divided in two areas called local and remote repository.
As mentioned before, files in staging area are ready to be commited. But what is a commit? A commit is a changelist with a message summarising what was changed. Changes that are commited end up in local repository. You can commit the changes with this command:
git commit -m "Meaningful message"
Commit moves files from staging area to local repository
Remote is just like your local repository, but except it being native to your local machine, it's native to whatever git hosting service you are using. In other words, remote repository has is like local repository of some commit. Like local repository, it holds all the changes in history.
Create a PR to master of bootcamp for homework 1.
Chapter 1: Fundamentals
Chapter 2: Object Oriented Programming (to be started 2/19/2020)
Chapter 3: Intermediate C# (Q2)
Chapter 4: Testing (Q2)
Chapter 5: SOLID (Q2)
Chapter 6: Desktop UI (Q2)
Chapter 7: Design Patterns (Q3)
Chapter 8: EF and enterprise patterns (Q3)
Chapter 9: Async programming (Q3)
Chapter 10: Web Api (Q3)
Chapter 11: Security (Q4)