Set-up for Creating and Using a Git Remote Master Repo stored on the CS system

Basics for creating and cloning a git repo on our System
These are directions for creating your own git repo on the CS system. This is useful for students in upper-level CS courses who want to create their own git master repos on our system for project and lab work with partners.

The first step to using git is for one of you to set up a remote bare master repository for your shared project. Next, you and your partner clone local copies of the repo into your own private subdirectories. Finally, you each commit changes to your local copies and push and pull changes to and from the remote master to share work.

0. First time users config settings

Prior to using git for the first time, run
git config --global ""
git config --global  "Your Name"
Replace the email and name strings with your email address and name. If you have not run these commands, then the very first git commit will fail and tell you to run them.

You can also configure your default editor for commit messages (set to vim, or emacs or ...):

git config --global core.editor "vim"

1. Setting up a remote master repository to share a CS course project

Only one of you or your partner should set up a master bare repository for your shared work.

At this point, you now have a master git repository for your project that only you and your partners can access. All changes, additions, deletions, to this project can be done with git commands that will push and pull changes from this remote master copy.

2. Cloning a private copy of the remote master repo

After creating the remote master copy of the repository, both you and your partners should clone a local working copy of the master repo into a private subdirectory of your home directories:
 $ cd ~/private
 $ mkdir cs75
 $ cd cs75
 $ git clone ~newhall/share/cs75_lab2
 $ cd cs75_lab2
 $ ls 

 # FYI: you can look at the git config file to see where 
 # the remote master repository is (to where pull and push go)
 $ cat cs75_lab2/.git/config

3. Use your git repo

Refer back to the main using git page for information about using git: