Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 184 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
184
Dung lượng
3,44 MB
Nội dung
[...]... divided into four parts: • Part I is an introduction to version control with a Git slant Chapter 1, VersionControl the Git Way, on page 15 is where you’ll learn about versioncontrol in general and some of the fundamental concepts around VCS and how DVCS is different Chapter 2, Setting Up Git, on page 26 walks you through installing and configuring Git, and Chapter 3, Creating Your First Project, on page... installing and configuring Git 25 Chapter 2 Setting Up Git Before you can use Git, you have to install it and do some minimal configuration Installation is a relatively straightforward process In this chapter, we’ll do the following: • Install Git • Get it configured • Introduce you to Git s GUIs • Show you how to use Git s built-in help Once we’re finished, you’ll be ready to start usingGit to manage your projects... prompt> sudo apt-get build-dep git- core git- doc That installs all the dependencies for the git- core and git- doc packages— the same dependencies Git has when you’re building from source Once the installation is completed, you can build Git To do that, you need to uncompress the archive you downloaded from the Git website and switch into the directory where it’s located To build Git, type the following command:... prompt> git versiongitversion 1.6.0.2 3 http:/ /git. or.cz/ 27 I NSTALLING G IT Check with your distribution’s community and/or vendor if you’re uncomfortable compiling software from source They may be able to point you to a more up-to-date package Installing on OS X If Mac OS X is more your style and you want to use a package manager, MacPorts keeps its copy of Git relatively current To install Git using. .. compiling Git is similar to that in the Linux section The only part that changes is the documentation I would advise against adding doc and install-doc to the make commands because the dependencies can be a bit overwhelming Regardless of how you install Git, you can run gitversion from the command line once you’re finished installing to verify that it is installed: prompt> git versiongitversion 1.6.0.2... repositories Next up, if you plan on usingGit to talk to a Subversion repository like we’ll discuss in Chapter 10, Migrating to Git, on page 136, you need to install the subversion-perl package from the Libs category Also in that category, you should grab tcltk so you can take advantage of the integrated graphical interfaces for Git that we’ll talk about in Section 2.3, UsingGit s GUI , on page 33 Finally,... that pops up, type cmd, and click OK Once it is started, type gitversion If everything is successful, Git outputs its version number like it does in Figure 2.3, on the next page Regardless of which operating system you’re running, some basic configuration is necessary before you can start usingGit Let us cover that now 2.2 Configuring GitGit requires a few pieces of information from you to work Since... Git you’re ready to start using it Before we jump into our project in Chapter 3, Creating Your First Project, on page 36, let’s cover some of Git s graphical user interface (GUI) options 2.3 UsingGit s GUI Git comes with a Tcl/Tk8 GUI interface You can run it from within your project’s directory by typing git gui at the command prompt Some OS-specific installers include context menu links to open git- gui—the... of Git s commit log features If you don’t know what a commit log is, don’t worry—you will once you’re finished with the next chapter Git on MSys There is a fork of Git that aims to bring Git to Windows using the underlying Windows architecture It is not officially supported yet but is in the process of being merged back into the official Git repository A project has been started on Google Code called Git. .. http://www.pragprog.com/titles/tsgit 13 Part I Welcome to the Distributed World 14 Chapter 1 Version Control the Git Way A version control system (VCS) is a methodology or tool that helps you keep track of changes you make to the files in your project In its simplest, manual form, a VCS is you creating a copy of the file you’re working with and adding the date and time to the end of it Being pragmatic, we want something . saying about Pr
agmatic Version Control
Using Git
Pragmatic Version Control Using Git is an excellent guide to getting you
started with Git. It will teach you. stributed version control
and Git much less mysterious after reading this book.
Mike Mason
Au
thor, Pragmatic Version Control Using Subversion
Pragmatic