Git -



Version Control System (VCS) .

VCS:

  • .
  • 1 2 .
  • .

VCS:

  • VCS ) CVCS
  • VCS ) 3DVC

Git. Git .

... . .

DVCS .

... .

.

DVCS .

GIT

4

GPL . . Git . .

5 GIT C .

Implicit backup

1

GIT HASH 2 Checksum Commit GIT .

3 4 .

CVCS GIT .

DVCS

VCS .

Working Directory and Staging Area or Index

CVCS 6 GIT :

Let us see the basic workflow of Git.

Staging area Index .

Commit Commit .

Git Tutorial

Commit 1SA Commit .

# First commit
[bash]$ git add sort.c

# adds file to the staging area
[bash]$ git commit m Added sort operation

# Second commit
[bash]$ git add search.c

# adds file to the staging area
[bash]$ git commit m Added search operation

Blobs

Binary Large Object 2 BLOB BLOB Meta data SH1 Hash GIT database .

Trees

BLOB Directory SHA1 .

Commits

DVCS Commit Commit SHA1 Commit 3 Commit Commit

Branches

Branch Master Branch Head Branch Commit Commit Head Branch .

Tags

Branch TAG 1 Branch Tag .

Clone

Clone 2 .

Pull

Remote Directory Local Directory .

Push

Remote Directory .

HEAD

3 Branch Commit Head . Head .git/refs/heads/ .

[CentOS]$ ls -1 .git/refs/heads/
master

[CentOS]$ cat .git/refs/heads/master
570837e7d58fa4bccd86cb575d884502188b0c49

Revision

Revision 4 5 Revision Commit SHA1 .

URL

.git/url .

[tom@CentOS tom_repo]$ pwd
/home/tom/tom_repo

[tom@CentOS tom_repo]$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = gituser@git.server.com:project.git
fetch = +refs/heads/*:refs/remotes/origin/*
Advertisements