0% found this document useful (0 votes)
39 views

Version Control Systems

Version control systems allow managing multiple versions of documents and projects. Popular systems include CVS, Subversion, Mercurial and Git. Distributed systems like Mercurial and Git are more efficient and are replacing centralized systems. Version control provides benefits for both individual and team projects through features like tracking changes over time and easily merging work. Git is currently very popular due to its advantages over earlier systems. Basic Git tasks include configuring identity, initializing a repository, adding files, and making commits.

Uploaded by

d2op
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Version Control Systems

Version control systems allow managing multiple versions of documents and projects. Popular systems include CVS, Subversion, Mercurial and Git. Distributed systems like Mercurial and Git are more efficient and are replacing centralized systems. Version control provides benefits for both individual and team projects through features like tracking changes over time and easily merging work. Git is currently very popular due to its advantages over earlier systems. Basic Git tasks include configuring identity, initializing a repository, adding files, and making commits.

Uploaded by

d2op
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 6

Version control systems

 Version control (or revision control, or source control) is all


about managing multiple versions of documents, programs, web
sites, etc.
 Almost all “real” projects use some kind of version control
 Essential for team projects, but also very useful for individual projects
 Some well-known version control systems are CVS, Subversion,
Mercurial, and Git
 CVS and Subversion use a “central” repository; users “check out” files,
work on them, and “check them in”
 Mercurial and Git treat all repositories as equal
 Distributed systems like Mercurial and Git are newer and are
gradually replacing centralized systems like CVS and Subversion

1
Why version control?
 For working by yourself:
 Gives you a “time machine” for going back to earlier versions
 Gives you great support for different versions (standalone,
web app, etc.) of the same basic project
 For working with others:
 Greatly simplifies concurrent work, merging changes
 For getting an internship or job:
 Any company with a clue uses some kind of version control
 Companies without a clue are bad places to work

2
Why Git?
 Git has many advantages over earlier systems such as
CVS and Subversion
 More efficient, better workflow, etc.
 See the literature for an extensive list of reasons
 Of course, there are always those who disagree
 Best competitor: Mercurial
 I like Mercurial better
 Same concepts, slightly simpler to use
 In my (very limited) experience, the Eclipse plugin is easier to
install and use
 Much less popular than Git
3
Download and install Git
 There are online materials that are better than any that I could
provide
 Here’s the standard one:
http://git-scm.com/downloads
 Here’s one from StackExchange:
http://stackoverflow.com/questions/315911/git-for-beginners-the-
definitive-practical-guide#323764

 Note: Git is primarily a command-line tool


 I prefer GUIs over command-line tools, but…
 The GIT GUIs are more trouble than they are worth (YMMV)

4
Introduce yourself to Git
 Enter these lines (with appropriate changes):
 git config --global user.name "John Smith"
 git config --global user.email [email protected]
 You only need to do this once

 If you want to use a different name/email address for a


particular project, you can change it for just that project
 cd to the project directory
 Use the above commands, but leave out the --global

5
Create and fill a repository
1. cd to the project directory you want to use
2. Type in git init
 This creates the repository (a directory named .git)
 You seldom (if ever) need to look inside this directory
3. Type in git add .
 The period at the end is part of this command!
 Period means “this directory”
 This adds all your current files to the repository
4. Type in git commit –m "Initial commit"
 You can use a different commit message, if you like

You might also like