-
Write some code you want to make into a Git project.
-
Change to the root directory of the project.
$ cd project -
Initialize a Git repository.
$ git init -
(optional) Add a .gitignore file. This file contains regular expressions of files to ignore when committing. For example:
$ echo "*~" > .gitignore -
(optional) Add a README file. This will be displayed on the GitHub main project page.
-
Add all files in your project.
$ git add . -
Commit your project.
$ git commit -m "Initialization of project" -
Sign into GitHub and click New Repository.
-
Fill in project information and click Create Repository.
-
Add your GitHub repository as "origin". Note: use the location given to you by GitHub.
$ git remote add origin [email protected]:username/projectname.git -
Push your project to GitHub.
$ git push origin master -
Create a working branch to do your work on.
$ git branch working $ git checkout working -
Add contributors as others who may want to contribute. Go to the project's page on GitHub, click Admin, then Collaborators, and then add GitHub usernames.
Created
January 20, 2012 16:06
-
-
Save thelmuth/1648038 to your computer and use it in GitHub Desktop.
Instructions for initializing a group Git project for the CI Lab.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment