Created
April 12, 2013 18:32
-
-
Save alassiter/5374111 to your computer and use it in GitHub Desktop.
Create a new Git Repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---- ON LOCAL MACHINE ---- | |
git init | |
git add * | |
git commit -m "Initial Import" | |
# ---- END LOCAL MACHINE ---- | |
# ---- ON SERVER ----- | |
cd to_git_repo | |
sudo mkdir name_of_app.git | |
sudo chown git:git name_of_app.git | |
sudo chmod g+w name_of_app.git | |
# Become the git user | |
sudo su git | |
# Change into the new app directory | |
cd name_of_app.git | |
# Initialize the directory for git | |
git --bare init --shared=true | |
# ---- END SERVER ---- | |
# ---- ON LOCAL MACHINE ---- | |
git remote add origin ssh://git@name_of_server.com/path_to_repos/name_of_app.git | |
git push -u origin master | |
# ---- END LOCAL MACHINE ---- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment