Skip to content

Instantly share code, notes, and snippets.

@seanfisk
Created April 13, 2012 13:20
Show Gist options
  • Save seanfisk/2376804 to your computer and use it in GitHub Desktop.
Save seanfisk/2376804 to your computer and use it in GitHub Desktop.
Creating both a working tree repository and a bare repository
cd your_projects_dir
git clone --no-hardlinks http://cis.gvsu.edu/~fiskse/classes/cs380/labs/11.git your_project_name
mkdir your_project_name.git
cd your_project_name.git
git init --bare # a repo exclusively for sharing
cp ~fiskse/global/git-hooks/post-update hooks # updates perms correctly
pwd -P # this is your sharing path
cd ../your_project_name
touch a_change
git add a_change
git commit -m "this is my change"
git remote add sean ../your_project_name.git
git push origin master -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment