Differences between revisions 2 and 3
Revision 2 as of 2015-06-12 13:20:00
Size: 842
Editor: scot
Comment:
Revision 3 as of 2016-08-30 23:07:43
Size: 862
Editor: scot
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
ssh git@example.com
cd repos # you shouldn't use the base user directory for good reasons -- See SshGen page
ssh git@brain2.scotnpatti.com
cd /home/git/repos # you shouldn't use the base user directory for good reasons -- See SshGen page

Starting a git repository?

First setup the remote repository:

ssh git@brain2.scotnpatti.com
cd /home/git/repos               # you shouldn't use the base user directory for good reasons -- See SshGen page
mkdir my_project.git
cd my_project.git
git init --bare
git update-server-info # If planning to serve via HTTP
exit

On your local machine:

cd [your project directory]
git init
git add * # or "." if you want to add all the files in the hierarchy
git commit -m "My initial commit message"
git remote add origin git@example.com:repos/my_project.git
git push -u origin master

Others can now clone track the remote repository:

git clone git@example.com:repos/my_project.git
cd my_project

Adapted from: http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push/

ProjectManagementTools/StartingGitRepository (last edited 2023-06-06 19:32:34 by scot)