Repositories hold every version of your program. They come in two flavors: local and remote. Local repositories are on your disk, remote repositories are on a server.
- [Voiceover] Let's talk about what a repository is. And don't panic. This will be painless. It starts with repositories. Repositories are where your snapshot of your code are kept. In some version control systems repositories are centralized. You check your code out of a central repository, and you check it back in. Git is decentralized. Every Git user has his own repo. This has tremendous advantages.
You can work offline, and should anything happen to your repo anyone else working on the same project can get you up and running in no time. There is a central server, but it exists only for collaboration among teams and to get your work offsite for safe keeping. Should that central server explode your data is still safely tucked away in your own local repo. Your entire local repository is in a folder within your project folder.
This hidden repo folder is called .git. You can look in this folder, but don't touch. These centralized servers are known as remote repositories. There are a lot of options. You can host your own, or you can use one of the public repositories like Bitbucket or GitHub. Microsoft offers Visual Studio Team Services. We'll be using Bitbucket, because it's free, and you can keep your repositories private and it integrates nicely with SourceTree.
- SourceTree settings and preferences
- Committing files and messages
- Examining the basic flow
- Branching and merging
- Resolving conflicts
- Reversing the commit
- Adding to the stash
- Restoring from the stash
- Using the Terminal