vcs:git
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| vcs:git [2021/01/19 09:57] – kauffman | vcs:git [2021/09/22 17:19] (current) – ctopper | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Git ====== | ====== Git ====== | ||
| A collection of resources. | A collection of resources. | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| ===== External Guides ===== | ===== External Guides ===== | ||
| * [[https:// | * [[https:// | ||
| + | * [[http:// | ||
| Line 18: | Line 22: | ||
| === Initialize a bare repo in your CS home directory === | === 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/ | + | $ mkdir $HOME/gitbare/ |
| - | $ cd $HOME/ | + | $ cd $HOME/gitbare/ |
| $ git init --bare --shared | $ 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: | ||
| + | </ | ||
| + | |||
| + | ==== Example ==== | ||
| + | < | ||
| + | laptop:~$ ssh kauffman3@linux.cs.uchicago.edu | ||
| + | kauffman3@linux3: | ||
| + | kauffman3@linux3: | ||
| + | kauffman3@linux3: | ||
| + | Initialized empty shared Git repository in / | ||
| + | kauffman3@linux3: | ||
| + | </ | ||
| + | |||
| + | === Clone from inside your CS home === | ||
| + | < | ||
| + | kauffman3@linux3: | ||
| + | Cloning into ' | ||
| + | kauffman3@linux.cs.uchicago.edu' | ||
| + | warning: You appear to have cloned an empty repository. | ||
| + | |||
| + | kauffman3@linux3: | ||
| + | kauffman3@linux3: | ||
| + | kauffman3@linux3: | ||
| + | kauffman3@linux3: | ||
| + | [master (root-commit) b549cd7] add readme | ||
| + | | ||
| + | 1 file changed, 0 insertions(+), | ||
| + | | ||
| + | |||
| + | kauffman3@linux3: | ||
| + | kauffman3@linux.cs.uchicago.edu' | ||
| + | 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: | ||
| + | * [new branch] | ||
| + | </ | ||
| + | |||
| + | === Clone from your laptop or elsewhere === | ||
| + | |||
| + | < | ||
| + | laptop:~$ git clone kauffman3@linux.cs.uchicago.edu: | ||
| + | Cloning into ' | ||
| + | kauffman3@linux.cs.uchicago.edu' | ||
| + | remote: Enumerating objects: 3, done. | ||
| + | remote: Counting objects: 100% (3/3), done. | ||
| + | remote: Total 3 (delta 0), reused 0 (delta 0) | ||
| + | Receiving objects: 100% (3/3), done. | ||
| + | |||
| + | laptop:~$ ls -l myproject/ | ||
| + | total 0 | ||
| + | -rw-rw-r-- 1 kauffman kauffman 0 Jan 19 10:11 README | ||
| + | </ | ||
| + | |||
/var/lib/dokuwiki/data/attic/vcs/git.1611071869.txt.gz · Last modified: 2021/01/19 09:57 by kauffman