If you have never used your AFS space before, you may need to set it up. You can do this by visiting mfile.umich.edu and using the self provisioning tool. It may take a few hours to be created.
If you ssh to login.itd.umich.edu and have a home directory you already AFS space and are ready to go.
The server side directory, wherever it resides, needs to be set up as a bare repository.
Here’s how we can do this for AFS:
login to the remote server: ssh user@login.itd.umich.edu
Create a directory for your git remotes: mkdir git_remotes
Make a project directory, say 506: mkdir git_remotes/506.git
cd git_remotes/506.gitgit init --bareTo work with the directory, in your AFS space or elsewhere, clone the remote, add and commit files, push and pull.
506 directory to be.
cdmkdir gitcd gitClone the repository. Replace uniquename with your unique name, and “u” and “n” with its first two letters (i.e. /afs/umich.edu/user/j/b/jbhender/).
From a server with your AFS space mounted: git clone /afs/umich.edu/user/u/n/uniqename/git_remotes/506.git
From a shell on another computer, say your laptop:
git clone ssh://uniqname@login.itd.umich.edu:/afs/umich.edu/user/u/n/uniqename/git_remotes/506.git
cd 506echo "## About" > README.mdgit add REAMDE.md && git commit -m "Initial commit."git push -u origin masterYou could also create your files locally, initialize and then push to the remote. Repeat steps 3 & 4 to create a bare repository called personal.
cd ~/git/mkdir personalgit initcp ~/git/506/README.md ./git add REAMDE.md && git commit REAMDE.md -m "Initial commit."git remote add origin ssh://uniqname@login.itd.umich.edu:/afs/umich.edu/user/u/n/uniqename/remotes/personal.git/git push -u origin masterStep 8 will also work with remotes set up through a web interface with third party repository services such as Bitbucket or GitHub.