Lubos Programming Blog

Lubos Blog about Programming (mainly Java) and Computers

Git version control system

Git Notes and Links

Following is a collection of links about Git version control system.

Git is distributed version control system with following highlights and advantages:

  • Easy and fast branching and merging
  • Offline access
  • Secure
  • Speed
  • Simple design
  • Strong support for non-linear development (thousands of parallel branches)
  • Fully distributed
  • Able to handle large projects like the Linux kernel efficiently (speed and data size)

Read about important Git Basics here!

Video Tutorials

Tutorials

Books and Documentation

Web sites

Install Remote Repository

Install client

Managing Git Repository

  • Install and use gitosis to create/manage central repository
  • Clone gitosis-admin to your local machine
  • To add users, each user has to generate public ssh key using Git bash, download here
  • The public key has to be added to gitosis-admin/keydir
  • gitosis-admin/gitosis.conf has to be modified to add a user to the teams(s)
  • Commit the changes and push them to remote repository

Create new remote repository on server:


$ su git
$ mkdir example-project.git
$ cd example-project.git
$ git --bare init

Add project to remote repository on server:


# on your computer
$ cd example-project
$ git init
$ git add .
$ git commit -m 'initial commit'
$ git remote add origin git@gitserver:/home/git/repositories/example-project.git
$ git push origin master
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: