Join Kevin Skoglund for an in-depth discussion in this video Who should use Git?, part of Git Essential Training.
- View Offline
In this movie, I want to talk briefly about who should use Git. Now, as I said before, primarily people working with source code are going to get the most utility out of Git, but it's not just for them, it's really for anyone who wants to track edits, especially edits for text documents. It offers you the ability to review a log of changes that were made, to view differences between versions, and to retrieve old versions. Those features are not just limited to programmers, those are things that anyone working with the text file might want to be able to do. It's also useful for anyone needing to share changes with collaborators.
So one person makes a set of changes to document, someone else makes a set of changes to the document, and we want to merge those together or share changes between each other, then Git can help us to do that. However, Git is most useful for people who are not afraid of command-line tools. There are graphical user interfaces that we can use with Git, and we'll look at some of those later on, but it is first and foremost a command-line tool which is part of why it stays so popular with programmers and developers who aren't afraid of those command-line tools. So out of programmers and developers it doesn't really matter what language you're working in, doesn't matter if it's simple HTML or if you're working in a compiled language, you can use Git to track the changes in your source code.
Now the list of programming languages that I've got on the screen there is not just a list that I made up. These are some of the most popular languages that are used with Git. That Git is used to track projects in. There're many others as well, but if you work in any of these, you definitely will get a lot of utility out of Git. Now it's not as useful for tracking non-text files, images, movies, music, fonts, it will keep track of each of them, it'll keep track of the fact that you made a change to an image, it'll keep both the old image and the new image in the repository, but you won't be able to see the difference between the two, the same way that you can with text.
With text, they can say, oh, this bit of text on line 27 which changed from this to this. It can't really do that with these other files that are called binary files. It also doesn't work well with files that have to be interpreted by an application, word processing file, spreadsheets, PDF's, Photoshop PSD's, these kinds of files need an application to interpret them otherwise they're just a bunch of letters and numbers that Git won't understand. So Git will again keep track of the fact that you've a Microsoft Word file in version 1 and in version 2, but it won't be able to show you the difference, the text that you changed between those two files.
It has to be a pure text file, not interpreted by Word Processor. So if you think Git can be helpful and helping you to track changes and manage different versions, let's move forward in the next chapter by getting it installed.
- Exploring the history of version control
- Installing Git on Mac, Windows, and Linux
- Initializing a repository
- Writing useful commit messages
- Understanding the Git three-tree architecture
- Tracking when files are added, edited, deleted, or moved
- Viewing change sets and comparing versions
- Undoing changes and rolling back to previous versions
- Ignoring changes to select files
- Creating and working with code branches
- Merging branches and resolving merge conflicts
- Stashing changes for later
- Working with hosted repositories and remote branches
- Developing an effective collaboration workflow