User Tools

Site Tools


vcs:git

This is an old revision of the document!


Git

A collection of resources.

External Guides

Bare Git Repository in your CS Home directory

SSH to a CS server

ssh cnetid@linux.cs.uchicago.edu

Initialize a bare repo in your CS home directory

Note that a bare repo cannot be edited directly. You will need to checkout the repository elsewhere in your home directory.

$ mkdir $HOME/gitbare/myproject.git
$ cd $HOME/gitbare/myproject.git
$ git init --bare --shared

Check out your repository

Even if you are on one of the linux.cs servers you will need to checkout the bare repo.

git clone cnetid@linux.cs.uchicago.edu:~/gitbare/myproject.git

Example

kauffman@hades:~$ ssh kauffman3@linux.cs.uchicago.edu
The authenticity of host 'linux.cs.uchicago.edu (128.135.164.173)' can't be established.
ECDSA key fingerprint is SHA256:W8rbGZbIv57nNbbtCKF7FKMoqR0Wblw6lWzrh93HiyQ.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'linux.cs.uchicago.edu' (ECDSA) to the list of known hosts.
kauffman3@linux.cs.uchicago.edu's password: 

This system runs Ubuntu 20.04

For long running jobs please consider using the Slurm cluster `Peanut`.

  https://howto.cs.uchicago.edu/slurm:peanut

Questions:
  techstaff@cs.uchicago.edu
  Discord: https://discord.gg/ZVjX8Gv

- Techstaff
kauffman3@linux3:~$ mkdir myproject.git
kauffman3@linux3:~$ cd myproject.git/
kauffman3@linux3:~/gitbare/myproject.git$ git init --bare --shared
Initialized empty shared Git repository in /home/kauffman3/gitbare/myproject.git/
kauffman3@linux3:~/gitbare/myproject.git$ cd
kauffman3@linux3:~$ git clone kauffman3@linux.cs.uchicago.edu:~/gitbare/myproject.git
Cloning into 'myproject'...
kauffman3@linux.cs.uchicago.edu's password: 
warning: You appear to have cloned an empty repository.

kauffman3@linux3:~$ cd ~/myproject
kauffman3@linux3:~/gitbare/myproject$ touch README
kauffman3@linux3:~/myproject$ git add README 
kauffman3@linux3:~/myproject$ git commit -a
[master (root-commit) b549cd7] add readme
 Committer: kauffman3 <kauffman3@linux3.cs.uchicago.edu>
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 README

kauffman3@linux3:~/myproject$ git push
kauffman3@linux.cs.uchicago.edu's password: 
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 212 bytes | 212.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To linux.cs.uchicago.edu:~/myproject.git
 * [new branch]      master -> master
/var/lib/dokuwiki/data/attic/vcs/git.1611072585.txt.gz · Last modified: 2021/01/19 10:09 by kauffman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki