Sunteți pe pagina 1din 8

GIT

Git Intro

Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.
Branching and merging are fast and easy to do.

GIT History

Git was initially designed and developed by Linus Torvalds for Linux kernel development. Every Git working directory is a full-fledged repository with complete
history and full revision tracking capabilities, not dependent on network access or a central server. Git's current software maintenance is overseen by Junio
Hamano. Git is free software distributed under the terms of the GNU General Public License version 2.

Linus Torvalds has quipped about the name "git", which is British English slang for a stupid or unpleasant person. The official Git wiki also gives a number of
alternative explanations, including "Global Information Tracker". Git development began after many Linux kernel developers chose to give up access to
the proprietary BitKeeper system. The ability to use BitKeeper free of charge had been withdrawn by the copyright holder Larry McVoy after he claimed Andrew
Tridgell had reverse engineered the BitKeeper protocols.

GITHUB

GitHub is a web-based hosting service for software development projects that use the Git revision control system. It is written using Ruby on Rails by GitHub, Inc.
(previously known as Logical Awesome) developers Chris Wanstrath, PJ Hyett, and Tom Preston-Werner. GitHub offers both commercial plans and free accounts
for open source projects. According to the Git User's Survey in 2009, GitHub is the most popular Git hosting site.

The site provides social networking functionality such as feeds, followers and the network graph to display how developers work on their versions of a repository.

GitHub also operates a pastebin-style site, wikis for the individual repositories and web pages that can be edited through a git repository.

• As of January 2010, GitHub is operated under the name GitHub, Inc. Git Hub URL: https://github.com/

Projects that use GitHub as their hosted revision control platform include:

• Android, jQuery, JUnit, Eclipse, PHP, Ruby on Rails


Characteristics:
Strong support for non-linear development: rapid branching and merging

Distributed development: Git gives each developer a local copy of the entire development history, and changes are copied from one such repository to another.

Compatibility with existing systems/protocols

Efficient handling of large projects

Pluggable merge strategies

Cryptographic authentication of history

Toolkit-based design

Periodic explicit object packing

Refference: http://en.wikipedia.org/wiki/Git_(software)

EGit (Eclipse Pluggin)

Git is one of the modern DVCS (distributed version control system); it is fast and effective, with lots of features and new solutions for
version control systems. Right now, Eclipse has base support for Git ‘repositories’. Using EGit plug-in user interface developer can:

 commit changes
 create branches
 switch between branches
 fetch and push changes
 create and apply patches
 compare a single file with a local ‘repository’

Referrence http://www.vogella.de/articles/EGit/article.html
GIT-SVN Comparison:

Checkouts and Repositories. Each Subversion project has one central repository which stores all the history. Everyone has a checkout of the repository, which
they update from and commit to. Each Git project give everyone a personal repository, and lets them pull from and push to each other. Many Git projects use an
"official" repository that they agree to treat like an SVN repository.

URLs and paths. In Subversion, a URL identifies the location of the repository, and the path inside the repository identifies the branch or tag.
So “svn://svn.example.com/trunk” might be the URL for the trunk branch of your repository. In Git, the URL is still the location of a repository, but
branches and tags are labels you access with Git commands. So “git://git.example.com/” might be the URL for a whole Git repository.

svn copy svn://svn.example.com/old_branch \


git branch new_branch old_branch
svn://svn.example.com/branches/new_branch

svn switch \
git checkout new_branch
svn://svn.example.com/branches/new_branch

Visualize. Git version history can get complicated, especially in big projects. You may like to look at your repository with the gitk viewer to understand what's
going on.

Revisions. Subversion identifies revisions with numbers starting at 1 and going up in each revision. That's fine when one central repository keeps track of all the
numbers, but who decides the next revision number if everyone has their own repository? Git uses unique 40-character identifiers instead

Speed. Git is faster than SVN


Repository Layouts:

The distributed nature of Git gives you a lot of flexibility in how you manage your repositories. Every person on your team has their own private repository

—the repository that only that person can update. However, there are two distinct ways to handle public repositories. For a visual explanation of these

layouts, see Figure 2, on the following page. One method is the fully distributed model. In this, each developer has their own public repository that the developer
uses to publish their changes to. All the other developers on the team then pull changes from everyone else’s repositories to keep current.

In practice, most teams have a lead developer who is responsible for making sure all the changes are integrated. This limits the number of repositories you

and your team have to pull changes from to one, but it increases the workload on the person who has to integrate everyone’s changes. Another method is the
shared repository model, where all developers can push to a shared repository. This resembles the standard centralized model and is often adopted by teams
when they first start using Git—it requires the least amount of mental overhead when it comes to thinking about where a change is shared. You can mix both of
these as well to create a hybrid solution. Use a shared repository for all of the code that’s ready for production, and each developer maintains their own public
repository for sharing code that’s still a work in progress.
Git-SVN Comparison(Crash Course): https://git.wiki.kernel.org/index.php/GitSvnCrashCourse#Browsing

Git Hub URL: https://github.com/


Git Commands: https://git.wiki.kernel.org/index.php/GitCheatSheet

http://jan-krueger.net/development/git-cheat-sheet-extended-edition
Some Commands:

Global setup:
Download and install Git
git config --global user.name "mfarhankhan"
git config --global user.email farhan.khan@geniteam.com

Next steps:
mkdir WMX1
cd WMX1
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:mfarhankhan/WMX1.git
git push origin master

S-ar putea să vă placă și