dixie state college logo
dixie cit it cs vt degrees courses faculty facilities jobs submit login
dixie > cit > cs > cs2810 >



Computer and Information Technology

  Degrees
  Courses
  Faculty
  Facilities
  Contact
  Jobs
  Scholarships
  ACM Club
CS 1010 1400 1410 2420 2450 2810 3400 3410 3500 3510 3520 3530 3600 4300 4550 4600 3310
Home Syllabus Schedule Log Grading

CS 2810 Computer Organization and Architecture

First, start using git in your local directory:

cd root_of_project
git init
git add .
git commit -a -m 'initial commit'

Then set up an empty repository on your server:

ssh user@server
mkdir project.git
cd project.git
git --bare init

The --bare tells it to make the server just a repository with no working directory tree. Then back on the client side, link the two:

git remote add origin ssh://user@server/~/project.git

Look in .git/config and make sure that you see the following:

[branch "master"]
    remote = origin
    merge = refs/heads/master

It should be set automatically, but sometimes it is not.

Finally, push your local repository to the server. The first time you do this, use the command:

git push origin master

Now you are set up. From now on, use “git push” to push (committed) changes to the server, and “git pull” to merge server changes into your local copy. To start another client, go to where you want it and use:

git clone ssh://user@server/~/project.git [local directory name]

If you don’t specify [local directory name], it will copy the name from the server.

From then on I mainly use, “git status“, “git add“, “git commit -a“, “git push” and “git pull“. Every few months, you can throw in a “git repack && git gc” for good measure.

Student Projects   
CIT.DIXIE.EDU